+ 4
How can I get the files from Android using browser like Chrome, Mozilla...
I used to see file through a browser(Mozilla) in my pc using the file:// protocol. But how can I use it on Android?
15 Answers
+ 6
Your internal storage is mounted to /storage/emulated/0/
So you may place your html in the internal storage and open it through file:///storage/emulated/0/path/to/yourfile.html.
But if the device has newer versions of android this might not be possible. In that case open MyFiles on your phone and click on the html file to load it.
However in the second case your externally linked js and css files wont load so you would have to place them in your html file only. The best I would recommend is to download Pydroid3 or Qpython and render that file through a flask server, which render the files by location. I would give you the code for mine if you want.
+ 5
You can't use the file:// in android due to security issues but i guess it may work with firefox android. It won't with chrome
+ 4
Arnesh that method doesn't work for devices with newer versions of android or samsung devices
+ 3
MD Abdullah
But how?
+ 3
In html, you can use input[type="file"] which work in both PC,mobile an you can access any kind of file from user device
+ 3
NUHEEN oh I completely misunderstood the question😅🤦♂️.
Nice answer Master Genius
+ 2
NUHEEN yes that is for security.
Everytime you click on an html file it is copied to an inaccessible directory by chrome and rendered from there.
+ 2
Nice ans Master Genius 👍
+ 2
NUHEEN thanks
+ 1
file:///storage/emulated/0/Your/Path/To/Directory
+ 1
I clicked on the html file i wanna open then it opened in chrome and the link was:
content://0@media/external/file/15698
Really strange...
🤔🤔🤔
+ 1
So how to fix it?
I mean the method u gave may work but how can i find the path to my file?
long pressing the file and clicking details gave the file location but the location is different from what u said...
+ 1
Ok I'll try
+ 1
No MemeLord Dev u didn't misunderstood it.
0
chrome