1

I have this code to send message via whatsapp

Uri uri = Uri.parse("smsto:" + PhoneNumber);
Intent sendIntent = new Intent(Intent.ACTION_SENDTO, uri);
sendIntent.setPackage("com.whatsapp");
sendIntent.putExtra("sms_body", "Some text");
startActivity(sendIntent);

but when whatsapp is started it filled with the phone number but not with the text provided (also i've tried with Intent.EXTRA_TEXT)

Ahmad Aghazadeh
  • 15,872
  • 11
  • 96
  • 94

0 Answers0