mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-31 23:03:54 +01:00
dispatch appropriate request code to handle using respective callbacks
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
parent
39850a76dc
commit
cc54cc3f46
1 changed files with 7 additions and 1 deletions
|
|
@ -109,7 +109,13 @@ public class FilePicker implements Constants {
|
||||||
*/
|
*/
|
||||||
public static void openGallery(Activity activity, int type, boolean openDocumentIntentPreferred) {
|
public static void openGallery(Activity activity, int type, boolean openDocumentIntentPreferred) {
|
||||||
Intent intent = createGalleryIntent(activity, type, openDocumentIntentPreferred);
|
Intent intent = createGalleryIntent(activity, type, openDocumentIntentPreferred);
|
||||||
activity.startActivityForResult(intent, RequestCodes.PICK_PICTURE_FROM_GALLERY);
|
int requestCode = RequestCodes.PICK_PICTURE_FROM_GALLERY;
|
||||||
|
|
||||||
|
if(openDocumentIntentPreferred){
|
||||||
|
requestCode = RequestCodes.PICK_PICTURE_FROM_DOCUMENTS;
|
||||||
|
}
|
||||||
|
|
||||||
|
activity.startActivityForResult(intent, requestCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue