Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 160
Registered: ‎03-12-2011
My Device: PlayBook♥

Browser Integration?!

The thing is, I'd like to open up the built-in broswer app when someone clicks on a link im my app.

Can anyone give me some example for how to do that? :smileyhappy:

 

At the moment the links are opened in the app which is not a good thing.

Thanks for your help, I'll give Kudos for right answers! :smileywink:

----------
Please give free Likes if I helped you out! :smileyhappy:
Developer
Posts: 31
Registered: ‎03-06-2011
My Device: Not Specified

Re: Browser Integration?!

You'll want to use the invoke browser API

You just have to use code like:

 var args = new blackberry.invoke.BrowserArguments( page );

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

where page is a string containing the URL you want to vist. 

 

This will switch the app to the browser, and open the inputed webpage

EG: page = "http://www.blackberry.com" will open blackberry.com in the browser

And in your XML you need to have:

<feature id="blackberry.invoke" required="true" version="1.0.0"/> 
<feature id="blackberry.invoke.BrowserArguments" required="true" version="1.0.0"/> 

 

Developer
Posts: 160
Registered: ‎03-12-2011
My Device: PlayBook♥

Re: Browser Integration?!

Thank you!

I'll test that tomorrow :smileyhappy:

----------
Please give free Likes if I helped you out! :smileyhappy:
Developer
Posts: 31
Registered: ‎03-06-2011
My Device: Not Specified

Re: Browser Integration?!

No problem,

Make sure you test it in the newest simulator/SDK though.

This API is completely broken in all of the earlier ones.

Developer
Posts: 160
Registered: ‎03-12-2011
My Device: PlayBook♥

Re: Browser Integration?!

I'll do, thanks :smileyhappy:

----------
Please give free Likes if I helped you out! :smileyhappy: