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

Native Development

Reply
Contributor
xfstudio
Posts: 16
Registered: ‎01-06-2013
My Device: BlackBerry 10 - Z10 LE
My Carrier: Optus

How to open web browser from C++ native code?

Hi Guys,

 

I am working on a game for BB10 using Cocos2d-x, does any one know how to open the web url in a browser within the C++ native code?

 

Thanks a lot!

 

Please use plain text.
Developer
dishooom
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810
My Carrier: Verizon

Re: How to open web browser from C++ native code?

Havent tried this out... but i think this should work...

WebView* wbView = WebView::create();

wbView->setUrl(QUrl("http://www.google.com"));


mRootContainer->add(wbView);
Please use plain text.
Regular Contributor
Ovogame
Posts: 54
Registered: ‎10-19-2012
My Device: Playbook, DevAlpha
My Carrier: (na)

Re: How to open web browser from C++ native code?

I am using this:

 

navigator_invoke("http://www.ovogame.com/bb", NULL);

 

JC

http://www.ovogame.com/bb
Please use plain text.
Contributor
xfstudio
Posts: 16
Registered: ‎01-06-2013
My Device: BlackBerry 10 - Z10 LE
My Carrier: Optus

Re: How to open web browser from C++ native code?

Thanks, that works great! :smileyhappy:

Please use plain text.
Contributor
djreyes
Posts: 35
Registered: ‎11-13-2010
My Device: Torch 9810
My Carrier: Orange

Re: How to open web browser from C++ native code?

What about if you want open a dynamic url? like when it's been captured

DJ Reyes
Please use plain text.