Using Whatsapp url scheme on Android

Lucy Weatherford picture Lucy Weatherford · Oct 22, 2013 · Viewed 9.9k times · Source

I'm trying to use WhatsApp url scheme in a web application. I am using the WhatsApp documentation for url scheme for iOS, as detailed here: http://www.whatsapp.com/faq/en/iphone/23559013

When clicking on the following url: whatsapp://send?text=Hello

On an iPhone this opens up the phone's WhatsApp application. However on an Android it just looks for this url in Google, and does not activate the WhatsApp application.

Is there a url scheme for android? Is there something different that needs to be done/ some change to the code, to make it work on android as well?

How can I share a url in whatsapp from the browser, in a way that will work for both iOS and Android?

Answer

TUNER88 picture TUNER88 · Oct 8, 2014

Android URL Scheme seems to be the same as for iOS

WhatsApp provides a custom URL scheme to interact with WhatsApp:

If you have a website and want to open a WhatsApp chat with a pre-filled message, you can use our custom URL scheme to do so. Opening whatsapp://send?text= followed by the text to send, will open WhatsApp, allow the user to choose a contact, and pre-fill the input field with the specified text.

Checkout the official Android documentation