When I use Intent.ActionOpenDocument
as the activity the resulting picker shows all available document providers. When I use Intent.ActionCreateDocument
the resulting picker shows a limited subset of document providers. Does anyone know of a method to have the Intent.ActionCreateDocument
picker show all document providers?
Asked
Active
Viewed 209 times
0
-
What is the version of your device? – Leo Zhu Nov 09 '20 at 08:57
-
App Min version is 9(28) target version is 10(29) test device is 10(29). – Mike N. Nov 09 '20 at 13:54
-
I have Intent.ActionCreateDocument working as expected with DropBox and Google Drive. Have not been able to get OneDrive available under this scenario. – Mike N. Nov 09 '20 at 20:44
1 Answers
1
When OneDrive app is installed it support ACTION_OPEN_DOCUMENT
Intent (Android Storage Access Framework (SAF)
), but unfortunately it does not support ACTION_CREATE_DOCUMENT
intent from the same SAF
.Thus we can implement work-around: 1st invoke ACTION_SEND
and latter ACTION_OPEN_DOCUMENT
.
But this means bad user experience for end user when interacting with OneDrive comparing to doing same action with Google Drive (which support both open and create intents.) As result user would need to select file twice using OneDrive and only once if he use GDrive.

Leo Zhu
- 15,726
- 1
- 7
- 23
-
Thank you Leon for the info. Just had the opportunity to review the suggestion. I'll give that a test. I wonder why MS doesn't support ACTION_CREATE_DOCUMENT for OneDrive, and who should get the earful:) https://developer.android.com/reference/android/content/Intent#ACTION_SEND – Mike N. Nov 12 '20 at 12:52