I want to open local files that are on my sdcard in the Android browser. How can I accomplish this?
In order to view local files on the sdcard with the default Android browser just enter
file://sdcard/ and then the path to the file you want to view. For example if you have an xml file named "person" in a folder named "xmlfiles" it would look like
file://sdcard/xmlfiles/person.xml in your address bar. You can create bookmarks for the file you are viewing but if you try to make a shortcut to that bookmark or use a bookmark widget (at least the HTC one) these will not work and may give an error "The linked program is no longer installed on your phone". The bookmarks will work if opened from within the browser.
So far I have verified that the browswer can open/render these files: xml, html files(htm), and image files
It cannot open pdfs.
According to this comment it works for Android 2.1 and above