Link to React Native phone

Asked

Viewed 972 times

1

Someone would know how to put a link to open the smartphone’s Telefonic call when the user clicks on the phone number in apk ?

in waiting ...

2 answers

2

I don’t know if it’s your case, but doing it this way with href="tel:999999999" you get the Browser from smartphone recognize the number as a phone number. See examples

<span itemprop="telephone">
    <a href="tel:25266896">+55 (31) 2526-6896</a>
</span>

<span itemprop="telephone">
    <a href="tel:999816008">+55 (31) 99981-6008 (VIVO)</a>
</span>

OBS: Some older versions of Safari convert the numbers automatically to Link, which may lose their CSS formatting, so I suggest using <meta name="format-detection" content="telephone=no"> to avoid style problems in old safaris.

Example of how to customize CSS for phone links:

a[href^="tel:"] {
    color: orange;
    text-decoration: none;
}

0

You can use a normal html anchor link, specifying it as a phone link, as well as an email link:

ex: <a href="tel:00-000-000000" > 00-000-000000 </a>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.