I have an application that calls a number stored by a user. Everything works fine, unless the number contains commas or hash characters, in which case Uri is truncated after the digits. I read that you need to code a hash sign, but even doing this, or without a hash sign, commas will never pass. However, they go through if you just pick a number from your contacts. I have to do something wrong. For instance:
String number = "1234,,,,4#1";
Uri uri = Uri.parse(String.format("tel:%s", number));
try {
startActivity(new Intent(callType, uri));
} catch (ActivityNotFoundException e) { ...
Only number "1234" will get into the dialer.
source
share