2

I want to launch whatsapp from my hybrid application using phonegap. I went through the whatsapp url schemas.It is working fine with iOS . Here is the schema is used for iOS:

href = "whatsapp://send?abid=123&text=hello"

reference from : http://www.whatsapp.com/faq/en/iphone/23559013

As described abid is address book id. If I give correct abid the application redirect to the particular contact.

But as per my reading abid is not possible in android . Currently I am using url with out abid which redirects the application to the recent chats. so is there any way to redirect the application to the particular contact ?

V-Xtreme
  • 7,230
  • 9
  • 39
  • 79

2 Answers2

0

For Android, use Webintent plugin

EDIT
See whatsapp phonegap plugin.

iOS supports a generic URL scheme for whatsapp ("whatsapp://send?abid=").
However on Android the URL scheme is currently not supported.
This plugin implements the send-via-whatsapp functionality on Android.

Salmaan
  • 3,543
  • 8
  • 33
  • 59
  • First thing is I am doing it in phonegap . and off course I have seen docs . your answer not specifying how to send it to particular number – V-Xtreme Jul 01 '15 at 11:08
  • Ooops, sorry, i edited my answer... You should use plugin for android – Salmaan Jul 01 '15 at 11:16
  • I still dont think this is going to work . We need url schema first and we can think about redirecting :) . If you see the e.g. : url: 'geo:0,0?q=' + address , here we have specific schema , for sending address in same lines we need it for sending message to particular number – V-Xtreme Jul 01 '15 at 11:19
  • or whatsapp phonegap plugin https://github.com/ranjitpandit/whatsapp-phonegap-plugin – Salmaan Jul 01 '15 at 11:30
  • that will not work for me . I want github.com/ranjitpandit/whatsapp-phonegap-plugin functionality clubbed with message . Please read and understand my question – V-Xtreme Jul 01 '15 at 12:08
0

Two recent solutions (July 2017)

There's been many changes in that need lately but finally after years I've found, tested and refered two new different solutions that should work with any device (one is official). I've mentioned them in THIS OTHER ANSWER (because S.O. policies I had to put a link to the solution, no duplicates).

DavidTaubmann
  • 3,223
  • 2
  • 34
  • 43