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

你。 提交于 2019-12-17 19:44:08

问题


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!


回答1:


No, you cannot find out what the user chose.

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



来源:https://stackoverflow.com/questions/4417019/how-to-get-the-user-selection-from-startactivityforresultintent-createchooserf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!