How do I send DTMF tones and pauses using Android ACTION_CALL Intent with commas in the number?
Posted
by Rob Kent
on Stack Overflow
See other posts from Stack Overflow
or by Rob Kent
Published on 2010-03-29T23:52:59Z
Indexed on
2010/03/30
0:23 UTC
Read the original article
Hit count: 978
android
I have an application that calls a number stored by the user. Everything works okay unless the number contains commas or hash signs, in which case the Uri gets truncated after the digits. I have read that you need to encode the hash sign but even doing that, or without a hash sign, the commas never get passed through. However, they do get passed through if you just pick the number from your contacts. I must be doing something wrong. For example:
String number = "1234,,,,4#1";
Uri uri = Uri.parse(String.format("tel:%s", number));
try {
startActivity(new Intent(callType, uri));
} catch (ActivityNotFoundException e) { ...
Only the number '1234' would end up in the dialer.
© Stack Overflow or respective owner