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

Adobe AIR Development

Reply
Contributor
braden
Posts: 23
Registered: ‎12-08-2010
Accepted Solution

How can I access the browser in the simulator?

I heard the was a browser in the new simulator, How can I access it or open a link from my app that will go to the browser?

 

Thanks!

Please use plain text.
Developer
peter9477
Posts: 6,448
Registered: ‎12-08-2010
My Carrier: none

Re: How can I access the browser in the simulator?

Actually there is no actual browser app in the simulator, but there is the qnx.media.QNXStageWebView component.  It was previously undocumented but included (in beta2) and is now actually documented in beta3.

 

You can use this in your own apps, though it's not likely 100% reliable just yet and in some ways is worse in this version than in the previous one.

 

Search the forum for QNXStageWebView for code samples, noting the recent threads where we've had to make a few corrections to account for changes in the API that they made between the previously undocumented stuff and the new one.

 

It takes only a half dozen lines to get a real basic browser going with it, though without history, back buttons, and all those other nice things.

 

(Also note that browsers are one of the few types of app not acceptable for the free PlayBook offer.)


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Contributor
braden
Posts: 23
Registered: ‎12-08-2010

Re: How can I access the browser in the simulator?

Okay thanks! But if just link to a webpage in my app, when it is ran on a production playbook will it automatically open the browser , like it does on the iOS devices? Thanks
Please use plain text.
Developer
peter9477
Posts: 6,448
Registered: ‎12-08-2010
My Carrier: none

Re: How can I access the browser in the simulator?

 


braden wrote:
Okay thanks! But if just link to a webpage in my app, when it is ran on a production playbook will it automatically open the browser , like it does on the iOS devices? Thanks

 

I don't think it would do that by itself, but you could probably get that kind of behaviour by doing two things:

  1. Handle the qnx.events.ExtendedLocationChangeEvent.LOCATION_CHANGING event that the browser component would issue.
  2. Launch the external browser instead.

The only problem with this is that launching external apps is currently not supported or documented for the PlayBook, so we have no idea yet exactly how that will work.  I'm sure it will be handled, just not sure how.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Contributor
braden
Posts: 23
Registered: ‎12-08-2010

Re: How can I access the browser in the simulator?

Thanks!

Please use plain text.