Forum Xamarin.Android


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.

Storage Access Framework shows One Drive ,Google Drive twice

Is there a reason why I see third party apps twice. Setting the Intent.



  • BillyLiuBillyLiu Member, Xamarin Team Xamurai


    Could you post your code?

  • RajKulkarni.0951RajKulkarni.0951 USMember ✭✭

    @BillyLiu This is the equivalent Java code.
    Appreciate your help!

  • arodriguezarodriguez Member ✭✭

    I have the same issue which has to do with the Intent Action in this method of the StorageClientFragment class in the Android code above:

    public void performFileSearch() {
        // BEGIN_INCLUDE (use_open_document_intent)
        // ACTION_OPEN_DOCUMENT is the intent to choose a file via the system's file browser.
        Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
        // Filter to only show results that can be "opened", such as a file (as opposed to a list
        // of contacts or timezones)
        // Filter to show only images, using the image MIME data type.
        // If one wanted to search for ogg vorbis files, the type would be "audio/ogg".
        // To search for all documents available via installed storage providers, it would be
        // "*/*".
        startActivityForResult(intent, READ_REQUEST_CODE);
        // END_INCLUDE (use_open_document_intent)

    When the Intent Action is OPEN_DOCUMENT, only the first two Drive and OneDrive options are displayed, like in @RajKulkarni.0951 's screenshot, but apps like Dropbox don't show. When the Action is GET_CONTENT, I get the Dropbox option, but with the duplicated Drive and OneDrive options as well.

    I'd prefer if all the cloud services showed up when the Action was OPEN_DOCUMENT since it grays out the documents with MIME types that I don't want, but the duplicated options seem to open in their respective apps and allow the user to pick MIME types I don't support.

  • This is as designed. Even Google App shows the same behavior. Thanks @arodriguez

Sign In or Register to comment.