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

Adobe AIR Development

Reply
Contributor
Posts: 16
Registered: ‎06-16-2011
My Device: Blackberry Playbook
My Carrier: Software Engineer

Blackberry Playbook -QnxStageWebview

Hi,

 

I’ve got a quick question regarding the Playbook QNXStageWebView class. For Creating WebView am using below mentioned code.

webView:QNXStageWebView = new QNXStageWebView();

webView.stage = stage;

webView.blockPopups = true;

webView.viewPort = new Rectangle(10, 50, stage.stageWidth, stage.stageHeight - 50);

webView.enableCookies = true;

webView.enableJavaScript = true;

webView.enablePlugins = true;

webView.loadURL("http://www.yahoo.com");

stage.nativeWindow.visible = true;

This is working. But i want to add the webview into the one Container, no need to add in stage. Is it possible? Can you help me with this?

 

Regards,

Dhinakaran.T

Retired
Posts: 172
Registered: ‎06-07-2010
My Device: BlackBerry 8520
My Carrier: Rogers

Re: Blackberry Playbook -QnxStageWebview

Hello Dhinakaran,

 

Can you post a sample snippet code outlining how your containers are arragned so that I will be able to help in positioning your webView?

 

Essentially what you need to do is create a rectangle within your intended container. Point the webView.viewPort to that newly created rectangle. This will position your webView within that intended container.

 

Sincerely.

 

Raihan Masroor

BlackBerry Development Advisor

Raihan Masroor
BlackBerry Development Advisor
Contributor
Posts: 17
Registered: ‎07-23-2010
My Device: Blackberry Storm 9530
My Carrier: Verizon

Re: Blackberry Playbook -QnxStageWebview

Did you get this working?

Regular Contributor
Posts: 54
Registered: ‎03-21-2011
My Device: 1st Gen BlackBerry PlayBook 16GB (Gift from RIM :D)
My Carrier: WiFi

Re: Blackberry Playbook -QnxStageWebview

After using my brainz I came to the conclusion, that the one who started this thread wanted to add a QNXStageWebView to the display list.
Unfortunatelly, that is not possible. QNXStageWebView does not inherit from DisplayObject and can therefore not be added to a display list.
The AS3 class is just a bridge to the native Web Capabilities of the PlayBook. That means that the PlayBook OS handles the display of QNXStageWebView and not the Flash Player (here AIR). Because of that the WebView is displayed in a layer in front of any Flash content and is fully independent from the app display.
This is a signature. Don't expect anything fancy, for I would use an image if I could. But I can't, so cope with it...
Contributor
Posts: 17
Registered: ‎07-23-2010
My Device: Blackberry Storm 9530
My Carrier: Verizon

Re: Blackberry Playbook -QnxStageWebview

Ok.

I've spoken with Backberry Architect in D.C. Office and he is chedking with the Native Development Kit Group

on how to use Cascades in Blackberry OS 10 and some simple code to use WebView Class so In other words

just as how you would use BrowserField2 in OS 7, I want the equivelent on the PlayBook in OS 10 to display a URL that's an HTML5 URL and then Override the Navigation as like I have with the custom Protocol Handler for BrowserField 2.  I figured it would be about 10 lines of Code using Cascade and WebView Class (bb:Cascade:WebView) to display a URL and a simple example but I can't find one anywhere on BBForums, CrackBerry, Cascase Website so Need simple example from someone here.

Contributor
Posts: 17
Registered: ‎07-23-2010
My Device: Blackberry Storm 9530
My Carrier: Verizon

Re: Blackberry Playbook -QnxStageWebview

This dosen't work. See my note on this Forum where I'm working to get us an example of WebVIew (Like Browserfield2 would be used) in Native Development Kit using OS 10 Playbook and Cascase.  This can be developed for the Simulator now and the NDK Beta.  RIM may have the OS 10 Playbooks soon and there is a Beta Program for OS 10 Playbook you can apply for.  Write me back if you NDK example in C using WebView to display a HTML5 based URL.