You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

lannyf77's avatar
lannyf77
New member | Level 2
8 years ago

why using Intent.ACTION_OPEN_DOCUMENT does not list the Dropbox?

Tried on Android Os 4.4, and above, if using Intent.ACTION_GET_CONTENT the android's file picker lists Google drives, Google Photos, Dropbox, etc. If using Intent.ACTION_OPEN_DOCUMENT, there just are no apps (like Dropbox, Photos etc.) in the file picker's drawer except only Google Drive.

 

How to list the Dropbox in Android's file picker drawer if using Intent.ACTION_OPEN_DOCUMENT?

 

code snippet of using ACTION_OPEN_DOCUMENT and ACTION_GET_CONTENT are listed below:

 

Intent openIntent = new Intent(Intent.ACTION_GET_CONTENT);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {        openIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT);        openIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
    }    openIntent.addCategory(Intent.CATEGORY_OPENABLE);    openIntent.setType("*/*");    startActivityForResult(openIntent, ANDROID_FILE_PICKER);
Intent openIntent = new Intent(Intent.ACTION_GET_CONTENT);openIntent.addCategory(Intent.CATEGORY_OPENABLE);openIntent.setType("*/*");startActivityForResult(openIntent, ANDROID_FILE_PICKER);