How can I browse some html files, saved to SD?
Thanks.
Curious, how are you getting your html files on the SD card. Are you saving them on your PC first and then transferring them?
I'm only asking because I'd like to do the same thing (offline browsing). So I started to work on an app that would download a webpage, save it to the SD card and then let you see it later.
My app currently saves the html file to the SD card, but when I try and use the built in WebKit browser to read back the html file, it still tries to go and grab all of the images etc that are tagged in the html file.
So I then realized I'd have to enhance my app to strip out all of those references etc when the html file gets saved to the SD card. But I'm lazy so there my app sits....half done. If I ever finish it I'll put it on the Market Place.
In the meantime I was thinking of just using "wget" or even just "Save page" on the browser and then transferring them to the SD card by hand before a flight. Is that what you're doing?
How would you access saved html?
Lets say if I browse to file:///sdcard/1.htm it says could not be loaded, though I have copied 1.htm to sdcard.
Answering to your qestion, I just copying files directly to flash from my pc.
Last edited by worry; 11-26-2008 at 07:20 AM.
Correct. The built in browser does not support reading local files with file://
You need my app....if I ever finish it and put it on the Market. Four day weekend coming up so maybe I'll work on finishing it up.
Have you tried the Opera Mini Browser that was just released? I haven't yet and I'm at work right now so I probably won't be able to try it until later.
FYI, I had a second at work so I tried Opera and it doesn't support using "file://" either.
Yes, both opera and native browser does not support reading local html.
So, what is your app idea to help with this issue?
As I mentioned above, it's a simple app. You type a URL, it then downloads that page and saves it to the SD card.
Then later, when on a plane or wherever, you open the app, but instead of hitting "Save" you hit "Load" and pick the web page you previously saved. It reads it from the SD card and displays it.
I have the save portion working, but I'm still working on displaying the saved HTML. If I use a simple html file it works, but when I try anything with lots of tags and / or javascript etc it doesn't.
I might try and work on it some more this weekend.
So, though you can not make browser to open file from SD directly, you can do this via Android API?
Have you tried loading file that you copied from your pc (not made by your app)?
ps: I'd rather go to Vegas or LA than spending TG day on this![]()
Well it's a 4 day weekend. So even though I won't be working on it tomorrow, I'll probably work on it Sat or Sun
Yes, I created a "test.html" put it on my SD Card and I'm able to dispaly it just fine.
When I let my app download a site (I tried ask.com and msn.com just randomly) it won't display them. So that's what I have to work on to finish it up.
so, show your code )
Bookmarks