How to exclude a specific application from ACTION_SEND Intent?

后端 未结 6 539
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 04:55

I have used the following codes to exclude facebook app from my app chooser:

 List targetedShareIntents = new ArrayList();
    In         


        
6条回答
  •  南笙
    南笙 (楼主)
    2020-12-19 05:42

    Thanks to Ragu Swaminathan's answer, it works perfectly to exclude specific application in an IntentChooser. However, because the 'shareIntentLists' is added in front of the 'chooserIntent', some empty spaces may occur if the size of list is not multiple of 4. To solve this, try:

    Intent chooserIntent = Intent.createChooser(new Intent(), "Choose app to share");
    

提交回复
热议问题