Tom Dignan Tom Dignan - 1 year ago 60
Android Question

Why are '#' s in my extension not being dialed in Android?

Here is some code I am using to dial a phone number. It works fine, except for when I put a '#' in the extension. The ','s are to cause a delay before the extension is dialed. Why doesn't the '#' get dialed? Basically, any numbers after the # are just getting discarded.

String number = "555-555-5555,,1#123"
// # is not dialed, neither are 123
Intent intent = new Intent();
Uri uri = Uri.parse("tel:" + number);
Log.d("URI", uri.toString());
intent.setData(Uri.parse("tel:" + number));

Answer Source

You need to do String encodedHash = Uri.encode("#") to send it with ACTION_CALL.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download