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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 39
Registered: ‎08-15-2013
My Device: Blackberry 10
My Carrier: XL

Open Browser Within App

anybody can help me, i want to open browser within the app(not in new windows). I can do it for native facebook with invocation , but i do know how to do it for browser ?

Retired
Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: Open Browser Within App

[ Edited ]

Hi lichienmine,

 

For this you can use a WebView and indicate the url in the URL property.

 

Documentation: http://developer.blackberry.com/native/documentation/cascades/ui/webview/

API Doc: http://developer.blackberry.com/native/reference/cascades/bb__cascades__webview.html

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Developer
Posts: 127
Registered: ‎07-02-2013
My Device: Q10 v10.3.1.1565
My Carrier: {unbranded}

Re: Open Browser Within App

[ Edited ]

yep, webview. and don't forget to put it in scrollview - other way you won't be able to view content the goes beyond screen.

Developer
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel

Re: Open Browser Within App

[ Edited ]

Try this:

#include <bps/navigator.h>


QString _url="";
navigator_invoke(url.toStdString().c_str(),0);

-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Developer
Posts: 1,178
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Open Browser Within App

As others have pointed out you have to use a WebView for this since the BB10 browser doesn't publish a card for invoking. WebView works well overall, but it does have some unfortunate quirks, such as not honouring anchor hashes. See one of my earlier posts for workarounds for several of WebView's limitations.

 


lichienmine wrote:

anybody can help me, i want to open browser within the app(not in new windows). I can do it for native facebook with invocation , but i do know how to do it for browser ?






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Highlighted
Developer
Posts: 1,178
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Open Browser Within App

Actually, DON'T try this! navigator_invoke() has been deprecated, which means that at any time in the near or distant future the library for this may disappear on BB10 devices and your code will no longer work! In any case, this suggestion will just launch the BB10 Browser to display the URL, which you clearly stated is not what you want.

 

 

Use a WebView as suggested instead.

 


BrajeshSanodiya wrote:

Try this:

#include <bps/navigator.h>


QString _url="";
navigator_invoke(url.toStdString().c_str(),0);






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.