List of usage examples for android.app Fragment startActivityForResult
public void startActivityForResult(Intent intent, int requestCode)
From source file:com.ez.gallery.ucrop.UCrop.java
/** * Send the crop Intent with a custom request code * * @param fragment Fragment to receive result * @param requestCode requestCode for result *//*from w w w .ja va 2 s .c o m*/ public void start(@NonNull Context context, @NonNull android.support.v4.app.Fragment fragment, int requestCode) { fragment.startActivityForResult(getIntent(context), requestCode); }
From source file:com.android.messaging.ui.UIIntentsImpl.java
@Override public void launchDocumentImagePicker(final Fragment fragment) { final Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.putExtra(Intent.EXTRA_MIME_TYPES, MessagePartData.ACCEPTABLE_IMAGE_TYPES); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType(ContentType.IMAGE_UNSPECIFIED); fragment.startActivityForResult(intent, REQUEST_PICK_IMAGE_FROM_DOCUMENT_PICKER); }