I wonder, is there any way to choose behavior using Intent.createChooser method?
For example, I have an image, which I would like send by e-mail, if it's chosen (first option). And on second option I'd like to send sms with the link on this image
(For which I'll need complex actions - upload image to the sever, retrieve download link, which I'd like to be in the sms and paste it to the sms)
Could you possibly come up with any suggestion, what should I do to accomplish the second task?
I believe I can send an e-mail with image with something like this:
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("application/image");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{textMail});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"Some Subj");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Some Extra Text");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(fileUri));
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
UPD: I realized, that what I truly needed is to intercept the user click, if the sms was chosen in intent chooser. So, the question is how it might be accomplished?