Get IntentSender object for createChooser method in Android
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to use new version of Intent.createChooser method which uses IntentSender . Documentation states only that I can grab it from PendingIntent instance. In my case it seems that PendingIntent won't have any other use. Is there another way to obtain IntentSender or do I need create PendingIntent ? 回答1: the chooser target intent is not the PendingIntent . For instance, in the following snippet, I am declaring intent for ACTION_SEND , with type text/plain , and this is the my target intent for the Intent.createChooser . Then I am