Fragment startActivityForResult - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Fragment startActivityForResult method.

This code example shows how to use the following methods: startActivityForResult
        } 
 
        if (resultTo == null) {
            startActivity(intent);
        } else { 
            resultTo.startActivityForResult(intent, resultRequestCode);
        } 
    } 
 
    @Override 
    public boolean hasNextButton() { 
        // PreferenceActivity#hasNextButton() is protected, so we need to expose it here. 
        return super.hasNextButton(); 
    } 
 
    @Override 
    public Button getNextButton() {
        // PreferenceActivity#getNextButton() is protected, so we need to expose it here. 
        return super.getNextButton(); 
    } 
Full Snippet Info
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: getActivity, startActivityForResult
		BookAdapter adapter = (BookAdapter) l.getAdapter();
		openFile(new File((String) adapter.getItem(pos)));
	} 
 
	private void openFile(File f) {
		Intent intent = new Intent(this.getActivity(), ReadingActivity.class);
		intent.putExtra("bookname", f.getPath());
		startActivityForResult(intent, 0);
 
	} 
 
} 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: startActivityForResult
    this.fragment = fragment;
  } 
 
  @Override 
  protected void startActivityForResult(Intent intent, int code) {
    fragment.startActivityForResult(intent, code);
  } 
 
} 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: onCreate, startActivityForResult
 
	private final static int REQUEST_ENABLE_BT = 100;
 
	@Override 
	public void onCreate(Bundle pState) {
		super.onCreate(pState);
 
		BluetoothAdapter ad = BluetoothAdapter.getDefaultAdapter();
		if (!ad.isEnabled()) {
			Intent enableBtIntent = new Intent(
					BluetoothAdapter.ACTION_REQUEST_ENABLE);
			startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
		} else { 
			promptDevices(); 
		} 
	} 
 
	protected void startConnection(String string) {
		BluetoothDevice d = BtFragment.this.mBluetoothAdapter
				.getRemoteDevice(string);
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: startActivityForResult
        } 
 
        if (resultTo == null) {
            startActivity(intent);
        } else { 
            resultTo.startActivityForResult(intent, resultRequestCode);
        } 
    } 
 
    @Override 
    public boolean hasNextButton() { 
        // PreferenceActivity#hasNextButton() is protected, so we need to expose it here. 
        return super.hasNextButton(); 
    } 
 
    @Override 
    public Button getNextButton() {
        // PreferenceActivity#getNextButton() is protected, so we need to expose it here. 
        return super.getNextButton(); 
    } 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: startActivityForResult
  public void takePhoto() { 
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    File photo = new File(Environment.getExternalStorageDirectory(), "Pic.jpg");
    imageLocation = Uri.fromFile(photo);
    intent.putExtra(MediaStore.EXTRA_OUTPUT, imageLocation);
    startActivityForResult(intent, TAKE_PICTURE);
  } 
 
  private static final int TAKE_PICTURE = 1;
  private Uri imageLocation;
} 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: startActivityForResult
		//TODO Create the method to pick the logo from the gallery or cammera 
		Intent i = new Intent(Intent.ACTION_GET_CONTENT);
		i.setType("image/png");
		//i.addCategory(Intent.CATEGORY_OPENABLE); 
		//i.setData(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); 
		startActivityForResult(i, 0);
	} 
	 
	/** 
	 * Method that will be executed when the add process is launched. 
	 * This method will communicate the results to the exterior through 
	 * the specified listener 
	 */ 
	private void add(){ 
		Log.d(TAG, "A Add Team command has been received in the TeamsAddFragment");
		//Parse the Player information 
		Player t = parsePlayerInfo();
		if (t != null && dao != null){
			try { 
				dao.createOrUpdate(t);
Full Snippet Info
3
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Fragment startActivityForResult Questions & Answers:

startActivityForResult Method Overview
Call startActivityForResult(Intent, int) from the fragment's containing Activity.
See Code Examples for other Android Fragment Methods: