-Through a custom URL scheme: whatsapp://send?text=
-Through Android's intent system.
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
startActivity(sendIntent);
Tested on Android, SocialSharing plugin works but only if receiver is within device contacts. Then should check if exists on device contacts and create if not.
I'm an Android developer, how can I integrate WhatsApp with my app?
For Android can use WebIntent Plugin On previous enterprise version we'd use WebIntent
Add on config.xml
<access origin="whatsapp:*" launch-external="yes" />
I'm an iPhone developer, how can I integrate WhatsApp into my app?
Check Experimental feature from @EddyVerbruggen/SocialSharing-PhoneGap-Plugin . It implements
shareViaWhatsAppToReceiver
See WhatsApp sharing for a spefic number for android and iOS #488Or whatsapp-phonegap-plugin