I'm implementing what would seem to be an extremely simple solution on a stock Nexus 5 with 5.5.1/Lollipop but having difficulty. I wish to store a local HTML page directly on the phone to hold large lists of reference phone numbers:
<a href="tel:123-456-7890">Call Harold's Chicken Shack</a>
<a href="tel:234-567-8901">Call In n' Out Burger</a>
This used to work without any issues, but sometime earlier this year an Android update disabled it. Before, clicking the link would open the dialer on the phone and start a call to the number. Now, another webpage is shown titled "Webpage not available" and containing "The webpage at tel:123-456-7890 could not be loaded because: net::ERR_UNKNOWN_URL_SCHEME" in the body.
I've googled this extensively but remain unclear on the solution.
This problem is discussed here on:
Getting net::ERR_UNKNOWN_URL_SCHEME while calling telephone number from HTML page in Android
but all the responses on that question seem to be either incorrect or describing a solution that isn't referenced.
Some people suggest various formatting changes to the phone number:
<a href="tel:123-456-7890">Call Harold's Chicken Shack</a>
<a href="tel:1234567890">Call Harold's Chicken Shack</a>
<a href="tel:+123-456-7890">Call Harold's Chicken Shack</a>
<a href="tel:+1234567890">Call Harold's Chicken Shack</a>
However, the problem seems unaffected by hyphens or the + symbol.
Next, some people suggested setting a target for the link:
<a href="tel:123-456-7890">Call Harold's Chicken Shack</a>
<a href="tel:123-456-7890" target="_blank">Call Harold's Chicken Shack</a>
This also makes no difference in my testing. It would appear that some people feel this would work if the HTML page being used is in a frame. Just to be clear, the HTML page I am using is a single page, not inside a frame set, and stored locally on the phone.
Some comments seem to discuss different browsers. I am targeting stock Android 5.5.1/Lollipop WebView / HTML Viewer. I can actually confirm that the original code:
<a href="tel:123-456-7890">Call Harold's Chicken Shack</a>
will work correctly if opened in a number of third-party browsers. However, I am seeking a stock solution here.
A number of comments seem to indicate that special permissions need to be set, but there's no indication on where the files even are and I've been unable to find them at all, much less modify them. That makes me wonder if their permissions-related suggestions are even an option on a stock/unrooted Android device.
So, in summary, if you want to have a LOCALLY stored HTML page on your Android phone (not a script, not an app, not even an HTML page that is running JavaScript or something, ONLY a simple local HTML page with an "a href=" link that will put a phone number into the dialer when clicked...) how can this be done?
Thanks for your assistance.