I would like to start an intentchooser which can return any kind of file. The following code works with the usual file explorers (ES, Astro, etc.) but not with the built-in samsung My Files explorer.
Intent selectFile = new Intent(Intent.ACTION_GET_CONTENT);
selectFile.setType("file/*");
startActivityForResult(Intent.createChooser(selectFile, "Select File"), SELECT_FILE);
Does anyone know how to handle that samsung explorer? I tried to use Intent selectFile = new Intent( "com.sec.android.app.myfiles.PICK_DATA") but it doesn't seem to work.
Any ideas? Thanks.
Update: I used this code
Intent selectFile = new Intent();
selectFile.setAction("com.sec.android.app.myfiles.PICK_DATA");
startActivityForResult(selectFile, SELECT_FILE);
but I get this error: FORWARD_RESULT_FLAG used while also requesting a result. Anyone know what does this mean?
file/
is a valid MIME type prefix, for any MIME type. Please consider*/*
. – Sokul*/*
I can also see Contacts, Music, etc. but I want to show only file explorers. But still, with*/*
you cannot see My Files intent. I have to select the my files intent somehow manually. – Gertudegertyfile/*
. There are probably hundreds that do not, including Samsung's. I suggest that you solve the problem some other way. – Sokul*/*
, that's the problem. Check my updated question, in case you have any more ideas. – Gertudegerty