Take the 2-minute tour ×

How do I open a web browser from a Blackberry Webworks 2.0 application?

I tried:


but that doesn't want to work.


share|improve this question
Did you include the required features in your config file? <feature id="blackberry.invoke" /> <feature id="blackberry.invoke.BrowserArguments" /> <feature id="blackberry.identity" /> –  n4rzul Jul 27 '11 at 6:47

2 Answers 2

up vote 5 down vote accepted

I'll answer with one of my own working config files and a <script> section

<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="">
  <author>De Wet Steynberg</author>
  <feature id="blackberry.app" required="true" version=""/>
  <feature id="blackberry.invoke.BrowserArguments" required="true" version=""/>
  <feature id="blackberry.invoke" required="true" version=""/>
  <access subdomains="true" uri="http://www.somedomain.com">
  <content src="index.html"/>
  <rim:loadingScreen backgroundColor="#000000" foregroundImage=""/>
  <rim:navigation mode="focus"/>

and the script tag that does the job:

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

Tried and tested. Perhaps create a small test example. If that doesn't work there might be something wrong with your emulator. If you get a message moaning about permissions and such, do the following:

1) From the homescreen press the menu button
2) At the bottom go to options (The icon with the wrench)
3) Go to Applications
4) Click the menu button and select "Edit Default Properties"
5) Set everything to "Allow", Menu, Save
6) Click Menu, Edit Default Permissions again
7) Click Menu, Apply Defaults to All, answer "Yes" to the popup prompt
8) Now navigate to the "Downloads" or " Applications" section and start your app up again.

These settings sometimes seem to get lost on the emulator between restarts. As long as your app remains open you can avoid lengthy recompiles and emulator reboots though.

Hope this helps

share|improve this answer

If you are building you app for BlackBerry 10, the format of the invocation interface has changed. It now leverages the built in system invocation framework (very powerful).

Here is how you would launch the browser app using the new system:

      target: "sys.browser",
      uri: "http://www.blackberry.com"
   }, onSuccess, onError);

Fortunately, there is a great working sample app already published in Github: https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/invoke

share|improve this answer

Your Answer


