Forum Xamarin.Forms

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Missing Document Providers using Intent.ActionCreateDocument

Mike134Mike134 Member ✭✭
edited November 2020 in Xamarin.Forms

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? Second does anyone know of a method to determine what Actions a document provider supports on Storage Access Framework?

Best Answer

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Do you run Intent.ActionCreateDocument in the android 11?

    If so, here are some access restrictions, for details, you can refer to the following document.

    https://developer.android.com/training/data-storage/shared/documents-files#document-tree-access-restrictions

  • Mike134Mike134 Member ✭✭

    Thanks. Nothing there should be impacting, yet. Project is min version 9(28) target version 10(29) and testing on 10(29).

    The task is simply for the user to be able to create a new file on their OneDrive, GoogleDrive etc. by selecting a location and giving the file a name. Simple straightforward save as functionality. File is just a plain text file.

    I can work around the issue by having them copy a template to the cloud storage location of choice using a FileManager and then open using ActionOpenDocument which works fine, but feels dumb.

  • Mike134Mike134 Member ✭✭

    I have ActionCreateDocument working as expected with DropBox and Google Drive. Unfortunately OneDrive is still unavailable.

  • Mike134Mike134 Member ✭✭

    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

Sign In or Register to comment.