6

I'm triying to start whatsapp with an android intent:

String uri = "smsto:+123456";
Intent messageIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(uri));
messageIntent.putExtra("sms_body", "My Message");
startActivity(messageIntent);

It works great if the user picks the normal messaging application. But not if the user selects whatsapp from the chooser. The "compose text field" from whatsapp remains empty.

What am I doing wrong here? Do I need another putExtra()?

Tim
  • 1,659
  • 1
  • 21
  • 33
Domi
  • 1,451
  • 2
  • 13
  • 25

1 Answers1

16

Here is the answer from the whatsapp android support team:

enter image description here

Domi
  • 1,451
  • 2
  • 13
  • 25