05-03-2012 11:49 AM
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/41
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.
Solved! Go to Solution.
05-07-2012 10:20 AM
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
05-07-2012 11:35 AM
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.
05-07-2012 12:12 PM
Good to know ![]()