Jeff wrote:
> Hello all,
> I apologize if this is beating a dead horse, but I have been through
> the documentation and groups discussions over and over, and can't seem
> to resolve this issue....
> 
> What I want to do:
> - I am loading a remote web page into WebView using loadUrl() -
> example:  webView.loadUrl("http://myserver.com/page.html";);
> - That page has a very large image in it whose quality I do not want
> degraded by the OS. So I am putting it in the assets directory of the
> app.
> - The page.html that gets downloaded from my server, then has a
> regular img tag in it like so:
> <img src="file:///android_asset/largeimage.png"/>
> 
> I know there were some issues with reading assets from the file system
> with different versions of the platform. But its not clear what
> versions this affects and how to address the problem for all versions.
> Can someone please clarify:
> 
> A) should what I am doing above work (because its not)

Since you are loading the Web page from the Internet, I imagine WebView
will block local file access. This is not significantly different than
regular Web browsers, last I checked. Otherwise, Javascript could
rummage around the local file system, grab data, and send it hither and
proverbially yon.

> B) If it only works on some versions of the platform - which versions?
> How should this be addressed when I can't guarantee what version of
> the platform users are running?

Try creating a ContentProvider to serve the image, and see if you have
better luck with a content:// URL.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.0 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to