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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Regular Contributor
Transcendental_Mobile
Posts: 94
Registered: ‎04-07-2011
My Carrier: QED
Accepted Solution

QNXStageWebView Issue: "Browser cannot handle web page"

Has anyone seen this behaviour before / can anyone suggest a remedy.

 

An HTML page I'm displaying in a QNXStageWebView component (with all properties default-valued, e.g., allow JavaScript, allow plugins, etc.) has a link to this URL:

 

http://appworld.blackberry.com/webstore/content/41285/

 

Tapping on the link leads to failure. IIRC, I've seen both of these messages in exception dialogs:

    "Browser cannot handle web page"

        and

    (something resembling) "Unknown protocol"

 

This behaviour occurs in both debug and release builds (OS 2.0.1.358), and works fine in a regular web browser.

Please use plain text.
BlackBerry Development Advisor
dmalik
Posts: 339
Registered: ‎02-22-2012
My Carrier: Bell

Re: QNXStageWebView Issue: "Browser cannot handle web page"

Hi,

 

I believe you're getting this behaviour because it's the way that the PlayBook handles links to AppWorld. By default if you have a link in your application it will automatically launch AppWorld and take you to the page. So I assume that you're getting this error because you're not allowed to do this and we want to force people into AppWorld for tracking etc.

 

You will need to either just link to appworld or create a custom page for your game.

 

Regards,
Dustin 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Regular Contributor
Transcendental_Mobile
Posts: 94
Registered: ‎04-07-2011
My Carrier: QED

Re: QNXStageWebView Issue: "Browser cannot handle web page"

Hello,

 

I just revisited this issue yesterda; taking a look at the QNXStageWebView API HTML documentation, I noticed the unknownProtocol event and implemented the following (check for my particular URL of interest not shown):

 

	private function onUnknownProtocol(event:UnknownProtocolEvent):void
	{
		_webView.stop();
		event.preventDefault();
		flash.net.navigateToURL(new URLRequest(event.url));
	}

 

That does the trick.

Please use plain text.
BlackBerry Development Advisor
dmalik
Posts: 339
Registered: ‎02-22-2012
My Carrier: Bell

Re: QNXStageWebView Issue: "Browser cannot handle web page"

Good to know :smileyhappy:

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.