Make a call from a BlackBerry device application (single-line environment)

  1. Import the required classes and interfaces.
    import net.rim.blackberry.api.invoke.Invoke;
    import net.rim.blackberry.api.invoke.PhoneArguments;
  2. 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");
  3. 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);
  4. Check for IllegalArgumentException.

Was this information helpful? Send us your comments.