Invoke a BlackBerry Device Software application

You can create BlackBerry® device applications that invoke BlackBerry Device Software applications such as the messages application, the phone application, and the media application. When your application invokes a BlackBerry Device Software application, the application can make the BlackBerry Device Software application perform an action or display information.
  1. Import the required classes and interfaces.
    import net.rim.blackberry.api.invoke.CalendarArguments;
    import net.rim.blackberry.api.invoke.Invoke;
    import net.rim.blackberry.api.invoke.MapsArguments;
    import net.rim.blackberry.api.invoke.MessageArguments;
    import net.rim.blackberry.api.invoke.PhoneArguments;
    
  2. Invoke the Invoke.invokeApplication() method and use the appropriate parameters. For example:
    • To start the messages application and create a new blank SMS message, invoke the Invoke.invokeApplication() and use the following parameters: Invoke.APP_TYPE_MESSAGES and a MessageArguments object that uses the ARG_NEW_SMS field.
      Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
          new MessageArguments( MessageArguments.ARG_NEW_SMS) );
      
    • To start the calendar, invoke Invoke.invokeApplication(APP_TYPE_CALENDAR, CalendarArguments).
    • To start the phone application, invoke Invoke.invokeApplication(APP_TYPE_PHONE,PhoneArguments).
    • To start BlackBerry® Maps and display the default map view, invoke Invoke.invokeApplication() and provide as parameters Invoke.APP_TYPE_MAPS and a new MapsArguments object.
      Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments() );
      

For more information about using the net.rim.blackberry.api.invoke.Invoke class, see the API reference for the BlackBerry® Java® Development Environment.

Next topic: Unified search

Was this information helpful? Send us your comments.