Tuesday, October 9, 2018

sd card - How can I can open local files in the default Android browser?


I want to open local files that are on my sdcard in the Android browser. How can I accomplish this?



Answer



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


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...