Perraco
Perraco

Reputation: 17360

Android Problem with special character phone numbers and ACTION_CALL

I found a problem which I can't find solution, maybe someone has seen this before?

I use this to perform a call, now if the call is a special number such as *111#, the character # is not sent to the activity, resulting in a call to *111 without the # character.



    Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    this.startActivity(intent);

Anyone understand what happens?

Upvotes: 0

Views: 813

Answers (1)

inazaruk
inazaruk

Reputation: 74790

You should url-encode your tel:*111#:

String telUri = "tel:" + Uri.encode("*111#");

Upvotes: 3

Related Questions