cketti / ShareIntentBuilder

Share Intent Builder - Android Library for the type-safe creation of Share Intents.
Apache License 2.0
45 stars 8 forks source link

Filter list of target activities displayed in chooser dialog #1

Open javajack opened 9 years ago

javajack commented 9 years ago

Can share intent builder be leveraged for a specific app ?

What is the usecase ? I am creating a non standard share intent builder with image and text, it works fine with twitter and whatsapp. But not with facebook for obvious reasons, it crashes the sharing UX.

Can you create the intent builder in way that it would allow as to limit the list of target activities ( like whatsapp or twitter etc )

cketti commented 9 years ago

It is possible to configure the chooser intent to only display certain target activities. I'll add support for that in a future version.

javajack commented 9 years ago

"Filter list of target activities displayed in chooser dialog" is a correct and most relevant title :)

Just make sure that users are able to see only those activities which are present in the app.

If I pass on say "com.twitter.android,com.facebook.katana,com.whatsapp.android and org,reddit" as my list of activities to the builder, It should check and filter out these input activities as well if they are not installed in the app.

And finally last option should be "other" where a generic chooser would appear with all possible activities like it appears right now :)