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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Developer
FloPMT
Posts: 158
Registered: ‎03-12-2011
My Carrier: eplus

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:
Please use plain text.
Developer
Concession
Posts: 29
Registered: ‎03-06-2011

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"/> 

 

Please use plain text.
Developer
FloPMT
Posts: 158
Registered: ‎03-12-2011
My Carrier: eplus

Re: Browser Integration?!

Thank you!

I'll test that tomorrow :smileyhappy:

----------
Please give free Likes if I helped you out! :smileyhappy:
Please use plain text.
Developer
Concession
Posts: 29
Registered: ‎03-06-2011

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.

Please use plain text.
Developer
FloPMT
Posts: 158
Registered: ‎03-12-2011
My Carrier: eplus

Re: Browser Integration?!

I'll do, thanks :smileyhappy:

----------
Please give free Likes if I helped you out! :smileyhappy:
Please use plain text.