Files are Unselectable after calling ACTION_GET_CONTENT Intent

Try setting the type to "*/*" as suggested by Blundell.

If you don't want the user to be able to select content of any type you should log the file's type in onActivityResult (this answer shows how). Then try out a couple of valid files, view the log and modify intent.setType accordingly. You can use multiple types on KitKat and above as described in this answer.


When i tried with marshmellow and above the below code helped. I have tried with c#(xamarin). The multiple mime type is the key. Hope this helps someone

Intent intent = new Intent(Intent.ActionOpenDocument);
            intent.SetType("file/*");
            intent.AddCategory(Intent.CategoryOpenable);
            String[] mimeTypes = { "text/csv", "text/comma-separated-values" ,"application/pdf","image/*"};
            intent.PutExtra(Intent.ExtraMimeTypes, mimeTypes);
            ((FormsAppCompatActivity)Forms.Context).StartActivityForResult(intent, 7007);

Blundell mentioned it in the comment above, but you could also add the below to your manifest file. Also, try using setType("image/*).

    <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />