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
Highlighted
Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition
My Carrier: Vodafone

How to open browser within the app

Hi,

 

I need to open browser within the app(not in new window using invocation). The purpose is I need to have addressbar on top. How can I do that?

Rujuta Trivedi
Developer
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810
My Carrier: Verizon

Re: How to open browser within the app

[ Edited ]

Here's the link for invoking Browser from within an app

 

https://developer.blackberry.com/cascades/documentation/device_platform/invocation/browser.html

 

 

void MyInvocationApp::invkPic()
{
  InvokeManager* manager = new InvokeManager();
  InvokeRequest request;
	   	  request.setTarget("sys.browser"); 
		  request.setAction("bb.action.OPEN");
		  request.setUri("http://www.google.com");
	 
  InvokeTargetReply *targetReply = manager->invoke(request);

}

 

_Dishooom

 

Hope this helps...

Developer
Posts: 528
Registered: ‎10-06-2009
My Device: 9800,BB Dev Alpha,z10 limited edition
My Carrier: Vodafone

Re: How to open browser within the app

But this will open as card (in new window),I need to have it within the app like webview

Rujuta Trivedi
Developer
Posts: 16,750
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to open browser within the app

you already mentioned it: webview.

a card would be a new window, but within the app. the invocation above is for the full browser, not the card. the card is not (yet) available.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: How to open browser within the app

[ Edited ]

I tried to set up the invocation type as Viewer or Card in order to open a browser in app but it can not invoke browser.

If use invoke mechanism, the browser have to be opened as a new window.

 

If you want to open a browser, I think that the only way is using Webview.




p(^_^)q
Good good study, day day up
BlackBerry Development Advisor
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to open browser within the app

Hi,

It is not possible to invoke the browser app as a card. This is not supported. You will need to use a WebView.

 

Shadid