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: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA
Accepted Solution

New tabs not opening in webview

Hi, i used a webview to initiate login to facebook. The initial page appears with a login button in it. When it is clicked, it should actually open a new window(or a new tab), but it doesn't even appear in the current page in the webview. Any idea what might be wrong?

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: New tabs not opening in webview

It could be any number of things with the very little infotrmation you have provided.

Post the code you currently have and someone will look at it I'm sure.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Highlighted
Developer
Posts: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA

Re: New tabs not opening in webview

QVariantMap map;
map["initial-scale"] = 2.0;

 

QUrl settingsPageUrl = QUrl("http://connectapp.hostoi.com/index.html");

 

settingsWebpage = new WebView;
settingsWebpage->settings()->setViewportArguments(map);
settingsWebpage->setUrl(settingsPageUrl);

 

 

settingsPage->setContent(settingsWebpage);

navPane->push(settingsPage);

 

This results in my page being loaded, with a login button in it. But when I click on the button, it simply disappears and nothing else happens. Actually, what happens is the login page appears in a popup. But in simply doesn't load in awebview. What's wrong?

Retired
Posts: 81
Registered: ‎09-09-2013
My Device: BlackBerry Z10
My Carrier: Etisalat UAE

Re: New tabs not opening in webview

Hi SuhairZain,

 

I can't re-produce this problem. I've tested your URL using both QML/C++: code below and i get Facebook login page loaded in the Webview. (I've tested it using BB N SDK 10.1).

 

I've noticed that the page takes a few seconds to load.  

 

WebView {
                    id: webView
                    objectName: "webView"
                    url: "http://connectapp.hostoi.com/index.html"
                    settings.viewport: { "initial-scale" : 2.0 }
                    settings.zoomToFitEnabled: true
                    settings.activeTextEnabled: true
}

 

        // Create root object for the UI
        AbstractPane *root = qml->createRootObject<AbstractPane>();

	QVariantMap map;
	map["initial-scale"] = 2.0;
	QUrl settingsPageUrl = QUrl("http://connectapp.hostoi.com/index.html");
	WebView *settingsWebpage = root->findChild<WebView*>("webView");
	settingsWebpage->setUrl(settingsPageUrl);
	settingsWebpage->settings()->setViewportArguments(map);

 if you still facing the issue, please advice on the SDK version you are using? Which device OS / simulator version tested on? 

 

Thanks,

Kareem.

 

Kareem ELSayed | Application Development Consultant | Developer Relations | BlackBerry | Twitter:@kemobyte
Developer
Posts: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA

Re: New tabs not opening in webview

It's working now, though as you said, there is a delay in loading pages, any idea what might be wrong?
Developer
Posts: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA

Re: New tabs not opening in webview

Do you think that such a delay is normal in login pages?
Retired
Posts: 81
Registered: ‎09-09-2013
My Device: BlackBerry Z10
My Carrier: Etisalat UAE

Re: New tabs not opening in webview

Hi Suhair,

I don't think it's the login page, but it might be the WebView however, at the end the performance is not bad, I recommend to use activity bar attached to the webview so the end-user knows that something is happening.

Thanks,
Kareem.
Kareem ELSayed | Application Development Consultant | Developer Relations | BlackBerry | Twitter:@kemobyte
Developer
Posts: 123
Registered: ‎09-18-2013
My Device: Dev Alpha B
My Carrier: BSNL INDIA

Re: New tabs not opening in webview

i have already set a progress indicator and it works fine..  thnx buddy..