I am writing a file manager for Android and want to display a list of possible applications to open files depending on their type. I have this working already using the following:
String mimeType = DocumentFileHelper.GetMimeType(asset.file.getName());
Uri mediaContentUri = Uri.fromFile(asset.file);
startActivity(Intent.createChooser(new Intent(Intent.ACTION_VIEW).setDataAndType(mediaContentUri, mimeType).putExtra(Intent.EXTRA_STREAM, mediaContentUri).addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION), "View"));
I would like however to use the version that is more if a dialog-type interface. I've seen this dialog-type version in other apps (IE ES File Explorer) so I know it's out there, I'm just not sure how to expose it.
the method I'm using above just splits the screen and shows available applications for the given file type at the bottom half of the screen. It does the job, it's just kind of clunky.
Can someone point me in the right direction for how to call (the intent I presume) that is more of a modal dialog type interface?
TIA