Ahmed Fadhel Jedidi
Ahmed Fadhel Jedidi

Reputation: 3

android intent.ACTION_SEND WhatsApp, Edit message before sending

*Hi Everyone, My question is simple but still did not find any answer for it, when i use the Android Intent.ACTION_SEND in my App with a pre-filled message, i get the chooser, and when select WhatsApp for example (or Viber same behaviour), i cannot modify the text before sharing it with a contact.

So my question is: How can i EDIT the pre-filled message before sending it to the chosen contact.

 Intent shareIntent = new Intent(Intent.ACTION_SEND);
   shareIntent.setType("text/plain");
   shareIntent.putExtra(Intent.EXTRA_TEXT, "text");
   startActivity(Intent.createChooser(shareIntent, "share Action"));

Thanks a lot! Have a nice day *

Upvotes: 0

Views: 914

Answers (1)

iTurki
iTurki

Reputation: 16398

You Can't.

After you selected the App (i.e WhatsApp) from the Chooser, Your app have no control. It is now up to the chosen app to decide how to handle the message.

If you want to modify it, you should do it before firing your shareIntent.

Upvotes: 0

Related Questions