How to add whatsapp share intent to my app??
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.");
}
Thank you.. It's Working..
- Forum posts: 23
Aug 11, 2016 11:39:08 PM via Website
Aug 11, 2016 11:39:08 PM via Website
Happy to help
- Forum posts: 19
Dec 17, 2016 10:21:16 PM via Website
Dec 17, 2016 10:21:16 PM via Website
thanks man