BlackBerry - Launch URL in browser app

897 views
Skip to first unread message

Adam Biggs

unread,
May 24, 2011, 6:19:46 PM5/24/11
to phonegap
Hi Guys,

I've tried searching but I can't find an answer to this. How can I
load an external link using the Browser app on BlackBerry? My jQuery
Mobile link is formatted like this:

<a href="http://www.domain.com" data-role="button" rel="external"
target="_blank" type="submit" data-theme="a">Launch Link in Browser</
a>

This works perfectly in Android and iOS, but on the BlackBerry it
seems to try to load the link inside the PhoneGap app's "browser"
which gives a 400 error.

Is there any workaround for this?

Pete

unread,
May 25, 2011, 3:05:16 AM5/25/11
to phonegap
I haven't tried to launch the external browser, but one thing to
remember on Blackberry:
you need this in your config.xml

<access subdomains="true" uri="http://google.com"/>

for the domain you wish to connect

Michael Brooks

unread,
May 25, 2011, 6:28:42 PM5/25/11
to phonegap
This seems to be an oversight of the BlackBerry WebWorks SDK.

You can open the browser application with: https://gist.github.com/992136

If you want to naturally work with all `<a rel="external"
target="_blank">` then you may need to attach a click/touch event
listener to the body and inspect the attributes of each element that
fires the event. Random though.

Michael

Adam Biggs

unread,
Jul 5, 2011, 8:36:54 PM7/5/11
to phon...@googlegroups.com
Thanks this fix worked for me.
Reply all
Reply to author
Forward
0 new messages