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
dsokhan
Posts: 36
Registered: ‎07-06-2010
My Device: Blackberry Playbook tablet
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
RapsFan
Posts: 442
Registered: ‎08-02-2010
My Device: Z10

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.

Contributor
dsokhan
Posts: 36
Registered: ‎07-06-2010
My Device: Blackberry Playbook tablet

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
RapsFan
Posts: 442
Registered: ‎08-02-2010
My Device: Z10

Re: Accessing local files from QNXStageWebView

Glad to hear it dsokhan. Good luck!