Opening WhatsApp from within my Unity app

Hi,

I am trying to pass text messages from within my Unity Android app
to the different messenger apps installed on the device.

Application.OpenURL(“sms:”)
brings up the SMS messenger. Works fine.

Application.OpenURL(“mailto:”)
brings up the email client. Works fine.

However,
Application.OpenURL(“whatsapp:”)
just closes the app.

According to the official documentation from Whatsapp, this should work.
But it doesnt. So I am stuck.

Any ideas on what I need to do?

Thanks

1 Like

It seems that this method of invocation only works on iOS.

I know it is and old post, but just to close it. The way to interact with Whatsapp is this:

String url = “Share on WhatsApp”+ number +“&text=” + message;
//Number variable needs to include the country code. If you want to send a message to Guatemala
// and the mobile number is: 12345678, your final string will be:
// Share on WhatsApp

Application.OpenURL(url);

2 Likes

thanks, this looks very useful, I will try later.

I know your post is old but it works for me and Thanks :slight_smile:

1 Like