[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread Guitouille
And because I have read your question too fast, you have to put your html file in the assets directory too Guitouille On 14 jan, 16:42, tikky tiku...@gmail.com wrote: Hello, I have a locally stored webpage (html) under res/raw folder. The html is something like this: html    body        

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread Guitouille
Hello, In order to do that, you have to put your html and gif file in the assets directory. Guitouille On 14 jan, 16:42, tikky tiku...@gmail.com wrote: Hello, I have a locally stored webpage (html) under res/raw folder. The html is something like this: html    body        This is a test

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread tikky
Thanks Guitouille. In that case, what URL string do I give to webview's loadUrl(url) method? On Jan 14, 11:29 am, Guitouille guillaume.lardill...@gmail.com wrote: In fact your test.gif has to be in the assets folder in order to be visible. Guitouille On 14 jan, 16:42, tikky

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread tikky
Guitouille, I was able to load the html file using AssetManager and the web page loads as expected, but the image file is still not displayed. Is this the correct syntax? img src=test.gif/img I tried the following too: img src=file://test.gif/img img src=file:///test.gif/img .. but nothing

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread Jason Proctor
it's in the deep past for me and i can't remember how much success i had with this approach, but try URLs of the form -- file:///android_asset/test.gif accessing local files from webkit was a mess way back when, i've not looked into it recently so i can't tell whether it's been fixed up.

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread tikky
Nope, that does not work either. On Jan 14, 2:50 pm, Jason Proctor jason.android.li...@gmail.com wrote: it's in the deep past for me and i can't remember how much success i had with this approach, but try URLs of the form -- file:///android_asset/test.gif accessing local files from webkit

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread Jason Proctor
ISTR a new permission that came in with 1.5 or 1.6 that was required for this. sorry i don't remember which one it is. do you perhaps not have it set? another way around this i found to work is to write a simple content provider which effectively caches assets in the filesystem, and returns

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread tikky
Hi Jason, It works now. The issue was the I was loading the webview using: loadData(htmlData, mimetype, encoding); When I changed it to : loadUrl(file:///android_asset/test.html); everything started working fine :) Thanks for all the help. On Jan 14, 3:37 pm, Jason Proctor