Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the user selection from startActivityForResult(Intent.createChooser(fileIntent, "Open file using..."), APP_PICKED);?

Is there any way to get programmatically the user selection after

startActivityForResult(Intent.createChooser(fileIntent, "Open file using..."), APP_PICKED);

or

startActivity(Intent.createChooser(fileIntent, "Open file using..."));

I do not want to start the selected application - I only want to know which one is it?

Thanks!

like image 884
karla Avatar asked Dec 11 '10 13:12

karla


1 Answers

No, you cannot find out what the user chose.

You can, however, use PackageManager and queryIntentActivities() to make your own chooser.

like image 53
CommonsWare Avatar answered Oct 13 '22 02:10

CommonsWare