Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Special links (tel:, mailto:, sms:) on PWA

I am developing a website that uses PWA to create a native-style App on mobile phones.

The issue I'm facing is that when the app has been added to the homescreen, links that start with tel:, mailto: or sms:, do not work anymore.

In the normal chrome browser on android, these work perfectly fine - tel links open the dialer, mailto links open up the mail app, and sms links open up the SMS app.

It's just when you open them through the PWA, they end up on a blank screen that looks like this:

enter image description here

How can I get this to work in a PWA as it works in the browser?

like image 770
hash12 Avatar asked Nov 29 '17 01:11

hash12


1 Answers

Just had this issue. Having a link with a target of "_blank" stopped the SMS: URI from firing in my homescreen-launched web app:

<a href="sms:?body=Hello" target="_blank">

Removing the 'target' attribute from the link solved the problem:

<a href="sms:?body=Hello">
like image 140
A. Niese Avatar answered Nov 20 '22 18:11

A. Niese