Make a call from a
BlackBerry device application (single-line
environment)
-
Import the required classes and interfaces.
import net.rim.blackberry.api.invoke.Invoke;
import net.rim.blackberry.api.invoke.PhoneArguments;
-
Create an instance of the
PhoneArguments class, passing in the
ARG_CALL field, and the destination phone number.
PhoneArguments call = new PhoneArguments(PhoneArguments.ARG_CALL, "519-555-0100");
-
Invoke
Invoke.invokeApplication() to open the phone
application from your application, providing the
APP_TYPE_PHONE field, and the
PhoneArguments instance.
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, call);
-
Check for
IllegalArgumentException.
Was this information helpful? Send us your comments.