My application will be (optionally) sending social media updates when an action is performed.
I want to do this by using the user's installed social media apps. I don't want to restrict the user to any particular set of apps, so anything that can respond to an ACTION_SEND
Intent with a type of text/plain
will be fine.
However, I don't want the user to have to choose every time -- typically, they'll by using the same app every time, i.e. once they've picked TweetCaster/Facebook/whatever, they'll be sticking with it.
If I just startActivity()
with ACTION_SEND
and text/plain
, I get a "Complete action using" chooser up, and there's also a "Use by default for this action" checkbox.
But, this will set the default for that intent for all applications, and it seems (a) likely that someone might already have defaulted to a non-social-media-app for sending text, and (b) even if they haven't, it seems a bit "rude" to default such a generic intent as sending some text somewhere.
What do people generally do here? I got halfway through making a ListPreference that allows the choice of a particular application (so I can just fire off the intent at an app that's preferred for my app, not systemwide), but it seems like a lot of code for something so simple.
Am I missing something more obvious? Is there a way of firing up the chooser such that the "Use by default for this action" will only be used as the default action for my app ACTION_SENDing text/plain?