Reputation: 15
I'm using <a href="tel:050444444">Click to call</a>
code, it's working fine in Android, When the user click on "click to call" it's open the Dialer and what the user left to di is just to click on the phone icon (of the dialer) for do the call. Is there a way to make the dial auto? So when the user click on "Click to call" it's do the dial auto without need to click on the phone icon?
Upvotes: 0
Views: 2202
Reputation: 9710
It's intentional for browser to request for user confirmation before initiating a phone call, for security reasons: if there was no request for user confirmation, a malicious web page could programmatically initiate a phone call by triggering a click
event on a tel:
link, with all the security harm that derives from it (for instance, disclosing the user's telephone number, or possibly draining his/her phone credit).
This Google tutorial explicitly states that
On most devices with telephone capabilities, the user receives a confirmation before the number is dialed, to ensure that the user isn't being tricked into calling an expensive long distance or premium phone number.
So even if practically every modern (and not-so modern) browser supports tel:
links, the behavior you are attempting to obtain is simply not possible, and with some good reason.
Upvotes: 1