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


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
Contributor
Posts: 36
Registered: ‎07-06-2010
My Device: Blackberry Playbook tablet
My Carrier: MTS
Accepted Solution

Accessing local files from QNXStageWebView

[ Edited ]

Hi community,

 

I need help with understanding of playbook webkit capabilities.

 

My AIR app creates some images and save them to File.applicationStorageDirectory or File.applicationDirectory and QNXStageWebView must take those images and show.

 

QNXStageWebView displays some html with javascript that takes pictures from url that I give to him.

 

And for now webview can show only images that stored in src root folder in my project like "src/appicon.png" and I accessed this image from webview in this way "local:///appicon.png", in other way it produce an error like Document load fail[NetworkErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="Couldn't read a file:// file" errorID=-10037 url=file:///accounts/1000/appdata/com.xxx.PRPlaybook.debug.testDev_ybook_debug63d6f35d/app/air/142676836_2_0_0.png .

 

Please can anybody explain, where can I store created images to display them in webview?

 

 

Thank you.

Developer
Posts: 442
Registered: ‎08-02-2010
My Device: Z10
My Carrier: Telus

Re: Accessing local files from QNXStageWebView

Hi. In Notebook Plus I saved an image in the same dir as the .html I was working. Say my .html file is in File.documents I put the image there also then referenced it simply as 'appicon.png' without the file:///blahbblahblah.

Highlighted
Contributor
Posts: 36
Registered: ‎07-06-2010
My Device: Blackberry Playbook tablet
My Carrier: MTS

Re: Accessing local files from QNXStageWebView

Hi RapsFan,

 

Thank you, for your answer. I figured it out later, have no time to post solution. In my case, the link "file:///accounts/1000/appdata/com.xxx.PRPlaybook.debug.testDev_ybook_debug63d6f35d/app/air/

142676836_2_0_0.png" worked perfect. I don't know why it not worked for the first time I've try it.

Developer
Posts: 442
Registered: ‎08-02-2010
My Device: Z10
My Carrier: Telus

Re: Accessing local files from QNXStageWebView

Glad to hear it dsokhan. Good luck!