I am using something like this to share some text using available applications on the user's phone.
public void share(String subject,String text) {
final Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(intent, getString(R.string.share)));
}
My main problem is that I would like to have a different text if the user chooses Twitter instead of email for example (short version with short URLs VS full text with attached images).
How can ont find out which application the user has decided to use?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…