Using Invoke APIs in your BlackBerry widget

Tips and Tricks

One feature of Super Apps is that they integrate with the native applications on BlackBerry® smartphones. So, how do you go about doing this? For BlackBerry® Widgets, it’s actually pretty simple. The BlackBerry® Widget API provides the Invoke object, which allows you to design your application to seamlessly work with the other applications on the BlackBerry smartphone. This results in a richer BlackBerry smartphone user experience.

By leveraging the Invoke API, you can invoke virtually any other application on the BlackBerry smartphone through a simple API call, where you’ll set a parameter for the app you want to invoke and then pass in any parameters that application is expecting. Right out of the box, the BlackBerry API contains these APIs to invoke:

Address Book

<script type="text/javascript">
var contact = new blackberry.pim.Contact();
contact.firstName = 'Joe';
contact.lastName = 'Smith';

var args = new blackberry.invoke.AddressBookArguments(contact);
args.view = 0;

blackberry.invoke.invoke(blackberry.invoke.APP_ADDRESSBOOK, args);

BlackBerry Browser

<script type="text/javascript">
var args = new blackberry.invoke.BrowserArguments('');
blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);


<script type="text/javascript">
var appt = new blackberry.pim.Appointment();
appt.summary = 'Get Together For lunch';

var args = new blackberry.invoke.CalendarArguments(appt);
args.view = 0;

blackberry.invoke.invoke(blackberry.invoke.APP_CALENDAR, args);  // Calendar


<script type="text/javascript">

var args = new blackberry.invoke.CameraArguments();
args.view = 1; // Video Recorder

blackberry.invoke.invoke(blackberry.invoke.APP_CAMERA, args);  // Video Recorder Application


<script type="text/javascript">
var args = new blackberry.invoke.MapsArguments(43.26, -80.30);
blackberry.invoke.invoke(blackberry.invoke.APP_MAPS, args);


<script type="text/javascript">
var memo = new blackberry.pim.Memo();
memo.title = 'Oranges I like';
memo.note = 'navel';

var args = new blackberry.invoke.MemoArguments(memo);
args.view = 0; // New

blackberry.invoke.invoke(blackberry.invoke.APP_MEMOPAD, args);  // Memo Pad


<script type="text/javascript">

var args = new blackberry.invoke.MessageArguments('', 'hello', 'world');
args.view = blackberry.invoke.MessageArguments.VIEW_NEW; // New

blackberry.invoke.invoke(blackberry.invoke.APP_MESSAGES, args);  // New Message


<script type="text/javascript">

var args = new blackberry.invoke.PhoneArguments('555-555-5555', true);
args.view = blackberry.invoke.PhoneArguments.VIEW_CALL;

blackberry.invoke.invoke(blackberry.invoke.APP_PHONE, args);


<script type="text/javascript">
var args = new blackberry.invoke.SearchArguments('build', 'Joe');
blackberry.invoke.invoke(blackberry.invoke.APP_SEARCH, args);  // Search


<script type="text/javascript">
var task= new blackberry.pim.Task();
task.summary = 'Pick up Milk';

var args = new blackberry.invoke.TaskArguments(task);
args.view = 0;

blackberry.invoke.invoke(blackberry.invoke.APP_TASKS, args);

Any other Java application on the device

<script type="text/javascript">

var args = new blackberry.invoke.JavaArguments('net_rim_bb_memo_app');
blackberry.invoke.invoke(blackberry.invoke.APP_JAVA, args);  // Java


By leveraging these APIs, you can come up with a compelling user story or use case to design your application as a one-stop shop for anyone looking to organize their daily tasks through your app. Open an email, save a meeting invite, set GPS to locate the meeting room, associate tasks with that meeting – these are just a few of the countless ways you can easily leverage the Invoke APIs, taking your BlackBerry Widget to the next level and embracing the Super App concept!

Have you leveraged any of the Invoke APIs yet? Please share your stories with us here in the comments.

Join the conversation

Show comments Hide comments
+ -
  • BlackBerry Widgets |;

    […] […]

  • M Hawkins

    My Blurts app ( uses Invoke.APP_TYPE_PHONE to allow the user to dial their BlackBerry phone from their desktop computer via a Bluetooth connection. I have had the request many times to integrate Blurts with BlackBerry Messenger to allow users to see incoming message via Blurts on their desktop, and to send messages (like I currently do with SMS) from their desktop. Any info on when this would be possible?

  • steve zhang

    I have a question, I am confused with this API and the API in blackberry 6 browser java script API, which uses blackberry.launch object, like this:

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

    Could you tell us when we should use inoke object and when we should use blackberry.launch object?

  • Wovas

    I’m using this code:

    var args = new blackberry.invoke.BrowserArguments(‘’);
    blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);

    to open link in separate broser window.
    It works? but after that my app begin works slowly. Any other WebWorks App installed on device works slowly too.

    Anybody have any ideas to solve my problem?

    BB Bold 9700.
    BB OS

    • Mike Kirkup

      Unfortunately, we are going to need more information to help solve the problems you are seeing with your application. I would suggest moving this conversation to the Support Forums ( where our experts can walk you through the issue.

blog comments powered by Disqus