3

I am developing an application that has a share functionality. The problem is that I need to filter the applications that I share with. As far as I know, you can't do this using a standard Intent.createChooser giving an intent (which action is set to android.content.Intent.ACTION_SEND) as a parameter. All you can do is to rearrange the given list as presented here: Custom filtering of intent chooser based on installed Android package name , but this solution does not work for me, because I absolutely must remove some sharing apps from that list.

All I can do now is to create my own dialog containing a list of filtered apps, which I can get using

getPackageManager().queryIntentActivities()

To maintain the standard sharing user experience I want my dialog to look like the Intent.createChooser() dialog but I can't find the layout resource file to set as the content view of my dialog. I need this, because I have Intent.createChooser() dialog in my app for another purpose.

Can anyone help with a solution, maybe a workaround?

So I created my own dialog wich has a list of filtered sharing apps. All I need is to make it look as "standard" as possible. Can anyone help with a standard "share" layout resource or maybe a background color?

Community
  • 1
  • 1
rrdev
  • 115
  • 1
  • 12
  • 1
    You should not filter out some sharing apps. The user has installed those apps for a reason, removing some would just be confusing and causes a bad user experience for your app – Richard Oct 26 '12 at 08:29
  • Yes, but I have a different implementation for some of them - facebook sharing for example, so I want to filter this out so the user will use mine and not the standard one – rrdev Oct 26 '12 at 09:05

0 Answers0