How to launch an installed app such an Email composer or open a What'sApp?


#1

Trying to add buttons that will allow quickly to send a message. Does anyone know how to that or can share some sample script? Appreciate it!


#2

Hi there,

You can use the launchUrl() function to launch a mailto link, as described in this docs article.

The following example code would launch the device’s default email application with the recipient email address pre-filled with ‘support@zappar.com’.

Z.device.launchUrl("mailto:support@zappar.com", false);

You can also use the sms non-web link to launch the device’s default sms application with the number filled in. Launching WhatsApp however is not possible.

While you can open the respective applications, and specify the recipient, you won’t be able to pre-fill the message.

Hope this helps.

All the best,
Seb