Initiate a Phone Call on Android with Special Character #

initiate a phone call on android with special character #

I believe the problem is the that the # symbol has a special meaning in URIs, so you have to encode it using the Uri.encode() method like this:

    Intent out = new Intent();
out.setAction(Intent.ACTION_DIAL);
out.setData(Uri.parse("tel:" + Uri.encode("+12345#123")));
startActivity(out);

Sending ACTION_CALL Intent in Android containing hash # sign

Found a solution: String encodedHash = Uri.encode("#"); this did the trick...

click to call tel: link do not send the '#' symbol

I am assuming you are using an iphone - this is an exerpt from apple help

To prevent users from maliciously redirecting phone calls or changing the behavior of a
phone or account, the Phone application supports most, but not all, of the special
characters in the tel scheme. Specifically, if a URL contains the * or # characters, the
Phone application does not attempt to dial the corresponding phone number.

They relaxed it on the * but not on the hash - it is annoying I know!

using tel: url to initiate call - but need to insert SPECIAL CHARACTER #

I think it's not possible. And in another forum someone asked Apple about that, but never get an answer back

How to dial number with special characters using intent Android?

Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+ Uri.encode("*111#")));
startActivity(callIntent );

Happy Coding :)

Intent.ACTION_DIAL with number ending with #

The answer could be related with this link
initiate a phone call on android with special character #


This line could be the key
Uri.parse("tel:"+Uri.encode("*124#"));

How do I include # in tel:123#?

i have the same issue on android, not only on iphone, and I have solved (at least for Android) by escaping the string:

<button class="phoneCallButton">click me and call an hash number</button>

$(document).ready(function(){

$(".phoneCallButton").click( function()
{

window.location = 'tel:'+escape("*123#");
}
);
});


Related Topics



Leave a reply



Submit