Share Intent

  • Replies:4
  • OpenNot stickiedUnanswered
  • Forum posts: 73

Aug 6, 2016 3:03:32 PM via Website

How to add whatsapp share intent to my app??

  • Forum posts: 23

Aug 10, 2016 4:30:18 PM via Website

Try this code snippet

Intent whatsappIntent = new Intent(Intent.ACTION_SEND);
whatsappIntent.setType("text/plain");
whatsappIntent.setPackage("com.whatsapp");
whatsappIntent.putExtra(Intent.EXTRA_TEXT, "The text you wanted to share");
try {
activity.startActivity(whatsappIntent);
} catch (android.content.ActivityNotFoundException ex) {
ToastHelper.MakeShortText("Whatsapp have not been installed.");
}

  • Forum posts: 73

Aug 11, 2016 1:49:40 PM via Website

Thank you.. It's Working..:)