Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending pause to dialer

In a similar vein to Sending Pause and DTMF input in android, I'm trying to send the pause character "," to the dialer. This works on HTC Sense phones and even on the Xoom, but not on "stock experience" phones like the Nexus One or T-Mobile G2 (and I suspect the Motorola Droid).

These phones seem to have a dialer that tries to pretty-format the number (ie adding dashes) and stop upon hitting a comma character. Interestingly, it doesn't choke on a "p" character, though it will strip out "p"s and keep adding numbers.

Here is what the ActivityManager sees:

I/ActivityManager(   92): Starting activity: Intent { act=android.intent.action.DIAL dat=tel:8883333,444 cmp=com.android.contacts/.DialtactsActivity } 

I've also tried the encoded form, "tel:8883333%2C444" with no difference in behavior on these phones. I've tried "p", as mentioned, but these characters are dropped resulting in the dialers having 888-333-3444 incorrectly populated, and I'm not sure that "p" is correct anyway.

So, the question: Is there a way to specify a pause that works across most or all android dialers?

like image 867
pforhan Avatar asked Apr 21 '11 23:04

pforhan


People also ask

How do you put a pause in dialing?

A pause in a phone number is denoted by a comma , for example: 555-555-5555,67890. In this case, the phone would dial 555-555-5555, wait briefly, and then dial 67890. Pauses are useful when only a very short period of time is required after connecting a call before dialing additional numbers.

How do you put a pause in a phone number on iPhone?

When entering a contact number on the iPhone (i.e. in the Contacts app), at the bottom left of the keypad there's a + * # button, tap that, and you'll see a pause button, tap that to add a "comma" or "pause".


2 Answers

Short answer: Doesn't look like it's possible using the native dialer.

Long answer:

The native dialer in Android uses the following code to extract the number you pass in to the dialer using an Intent

if ("tel".equals(uri.getScheme())) {   // Put the requested number into the input area   String data = uri.getSchemeSpecificPart();   setFormattedDigits(data, null);   return true; }  

Within the setFormattedDigits method the number gets transformed thusly:

  String dialString = PhoneNumberUtils.extractNetworkPortion(data); 

Looking at the docs for extractNetworkPortion you'll notice that it, "Extracts the network address portion [where the] Network address portion is everything up to DTMF control digit separators (pause or wait).

So the code is intentionally striping out the pause character and anything that comes after it. The only alternative I can think of is to replace the dialer or use the ACTION_CALL action instead of ACTION_DIAL. That'll bypass the dialer, so it should be used with caution.

like image 124
Reto Meier Avatar answered Sep 21 '22 17:09

Reto Meier


dialing pause has been comma for 30 years

If the android phone is compatible with ITUT V.250 ATS8=2 should set the delay caused by comma to 2 seconds. (it's possible that it has somehow been set to 0s)

ITUT is a great standards orgnisation, you can download their standards for free.

like image 20
Jasen Avatar answered Sep 22 '22 17:09

Jasen