meumobi / infomobi-v2

http://meumobi.github.io/infomobi
2 stars 6 forks source link

direct call on whatsapp contact #224

Open vdias38 opened 7 years ago

vdias38 commented 7 years ago

I'm an Android developer, how can I integrate WhatsApp with my app?

There are two ways to integrate with WhatsApp:

-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);

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 #488

Or whatsapp-phonegap-plugin

vdias38 commented 7 years ago

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.