When I invoke code like this on blackberry using (compiling) JDE 4.5.
public void invokeCall() {
UiApplication.getUiApplication().invokeAndWait(new Runnable() {
public void run() {
PhoneArguments phoneArgs = new PhoneArguments(
PhoneArguments.ARG_CALL, "12345");
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, phoneArgs);
}
});
}
The result was that a pop up screen showed up and told that the phone number used to access extensions within my corporation has not been set.
In order to disable it I set the smart dialing country code to unknown.
(This problem did not occur when compiling on JDE 5.0)
Is there any blackberry code to set this automatically?
First of all, thanks for pointing out that smart dialing matters when making calls to extensions and injecting DTMF tones, because I have a similar project where this may cause problems.
In 4.5, you can configure smart dialing aswell, but the menu is not shown in main options menu, only in the phone app options. From the "Desktop", press a numeric key to bring the phone app to foreground, then press menu -> Options -> Smart Dialing -> Country Code.
Now, to set it programmatically, use this version of PhoneArguments constructor. So in your code, replace your arguments with this line to disable smart dialing:
PhoneArguments phoneArgs = new PhoneArguments(PhoneArguments.ARG_CALL, "12345", false);