1

Problem

I want to call anonymously using an HTML tel: link with the prefix #31#. This works on iPhone, but on Android it opens up an empty dial screen.

Using tel: links without the prefix work fine on both android and iPhone.

When clicked, the link does open the phone app, but the dial screen is empty. Without the prefix the dialscreen has the phonenumber filled in, ready to be called.

What I've tried

I tried to use encodeURIComponent('#31#') to escape the pound signs to no avail

<a href="tel:#31#0123456798">Anonymous tel:#31#</a> //opens empty dial screen
<a href="tel:0123456789">Regular tel:</a> //does work, but it's not anonymous

My research

Similar topics on stackoverflow only talk about native android code using Android Intent and ACTION_CALL which is not available in JavaScript. This is not of any use for me, I need a basic HTML (or Javascript) solution.

Question

How do I make an anonymous phone call on Android using a tel: link in HTML?

Code to demonstrate the problem

https://codepen.io/skrln/pen/WaPEwO

3
  • are you trying to do that in a hybrid application (i.e HTML as front and JAVA as Backend)?
    – vikscool
    Jun 25, 2018 at 9:06
  • @vikscool HTML and Javascript in a webview app
    – skrln
    Jun 25, 2018 at 9:29
  • if that is the case create an @javascriptInterface method in the backend which will call the phone intent and call that intent from your javascript function and in the intent function use this code how to use call intent. and this
    – vikscool
    Jun 25, 2018 at 9:40

1 Answer 1

3

You have to replace the # with %23 so you get %2331%23 instead of #31#.

For example:

tel:%2331%23XXXXXXXXXX

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.