0

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?

1 Answers1

1

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.

Raibaz
  • 9,280
  • 10
  • 44
  • 65
  • Thanks you for your answer. But there is a way to do it if i'm using Webview to show my website in APK file?? – iSender SMS Sep 20 '17 at 07:59
  • Looks like it's possible, but you need to have your app request for the CALL_PHONE permission: https://stackoverflow.com/a/5404269/1454 – Raibaz Sep 20 '17 at 15:10