blackberry.launch

Availability

BlackBerry Device Software 5.0 or later

The blackberry.launch object provides methods that lets you access core and add-on BlackBerry applications through JavaScript. Depending on the application, you can either launch the application or open the application and create a new item, such as a calendar entry or a task, and prepopulate any of the entry fields. Although the methods of the blackberry.launch object can open and create new items for an application, changes are not made to the application without confirmation from the user. For example, if you use the blackberry.launch object to make a phone call to a specific phone number, the user is prompted to confirm whether the user wants to proceed with the call before the number is dialed. Similarly, if you create a new item for any application, the user must save the item before it is added to that application.

Parameters for the blackberry.launch methods are provided in the form of a single JSON object. For example, to open BlackBerry Maps and display a set of coordinates, you could use the blackberry.launch.newMap() method as follows:

blackberry.launch.newMap({"latitude":4328915, "longitude":-8032480});

When a JSON object is identified as the parameter of a method, it is required. However, the members contained within the JSON object are all optional. For example, you can specify an empty JSON object as the parameter to a method, as long as the JSON object (identified by the braces) is present. For example:

blackberry.launch.newMap({});

Methods

Method name

Description

Availability

launchCamera()

Opens the Camera application.

5.0 or later

launchVideoRecorder()

Opens the Video Camera application.

5.0 or later

launchVoicemail()

Opens the Phone application to call the voice mail account that is associated with the BlackBerry device.

5.0 or later

newAppointment()

Creates a new appointment in the Calendar application.

5.0 or later

newContact()

Adds a new contact to the Contacts list.

5.0 or later

newMap()

Opens the BlackBerry Maps application and displays the specified location.

5.0 or later

newMemo()

Creates a new memo in the Memo application.

5.0 or later

newPhoneCall()

Opens the phone application to call a specific phone number.

5.0 or later

newSMS()

Creates a new SMS text message.

5.0 or later

newTask()

Creates a new task in the Tasks application.

5.0 or later

Last modified: 2014-03-10



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus