Special links (tel:, mailto:, sms:) on PWA
Asked Answered
W

2

9

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?

Whooper answered 29/11, 2017 at 1:30 Comment(4)
This was also reported in this forum. If you think this is a bug, you can file a report regarding this.Chlorous
I've filed bugs.chromium.org/p/chromium/issues/detail?id=792990 on your behalf with the details from this post. Please "star" that issue and respond to any requests for follow-up information there.Maryannmaryanna
I'm voting to close this question as off-topic because this is a bug report that should be addressed via the Chromium issue tracker.Maryannmaryanna
As per bugs.chromium.org/p/chromium/issues/detail?id=792990#c8 this should be fixed in the latest Chrome Canary builds.Maryannmaryanna
L
3

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">
Loats answered 23/3, 2019 at 21:49 Comment(0)
D
-1

Tested on Chrome 65.0.3325.109, tel: works fine when I use window.location.href='tel:12345678') in an onClick handler, as suggested by https://bugs.chromium.org/p/chromium/issues/detail?id=792990#c2

It did not work for me when I tried window.open('tel:12345678') however.

Dichlorodiphenyltrichloroethane answered 14/3, 2018 at 20:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.