Friday, July 6, 2018

4.0 ice cream sandwich - Local files revisited: Opening local HTML files (file:///path/to/file) in Chrome on Android 4.x


There are other questions on this same topic, but I'm finding that on 4.0.4 with my HTC One, I can open file:/// URLs just fine with Firefox, but not with Chrome or the Android browser. Those two simply report a security error and show no content.


Is this something that changed since the 2.x era when it was apparently possible? (edit well I realize there was no Chrome for 2.x but ...)


edit — sorry; false alarm. It works fine.


All the visible directories on the phone - those you browse through with a file explorer, or when you mount the device as mass storage - are under a top-level directory called "sdcard". Thus, if you create a folder at (apparently) the top level, then a file in it must be accessed as:


file:///sdcard/your_folder/hello_world.html

Probably most people know that already :-)




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 ...