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 keyUri.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
How Could I Filter the Listview Using Baseadapter
Android Studio 3.0 Manifest Error: Unknown Element <Action> Found
Android: Gles20: Called Unimplemented Opengl Es API
Error:Connectionresult{Statuscode=Internal_Error, Resolution=Null}
Error "Activity Class Does Not Exist" When Launching Android App with Adb Shell Am Start
Android Save Checkbox State in Listview with Cursor Adapter
Android Intent.Getstringextra() Returns Null
Getactionbar() Returns Null (Appcompat-V7 21)
Apache Http Connection with Android 6.0 (Marshmallow)
Get File Path of Image on Android
Mediarecorder Start Failed: -38
Android Devices with Different Height Takes Same Layout Folder
Android Volley Self Signed Https Trust Anchor for Certification Path Not Found
What's the Maximum Size for an Android Shared Preference Value