0

I have multiple chrome html files on PC that are all linked together.

For example, there is a table of contents and if I click A it will then open the html file for A and this can be then used to go back to the table of contents or I can go to B).

However, putting all these files together on mobile (SAMSUNG S8+ Updated up to date) does not allow them to be connected no matter which web browser or html viewing application I try to use (Clicking to go to another page just gives an error saying the other html file cannot be found). Additionally, the images part of the html document do not seem to load on mobile despite being in the same folder still.

I am wondering if there is a way to have all of these files linked on android as it does on PC.

1 Answer 1

1

Edit: As being said by @Robert, it probably is the default behavior of Google Chrome.

in this case I assume it is simply that Google has disabled the file:// protocol by default as it made it possible to browser and download files from the app-private directories. Not sure when this limitation was introduced.

Because, an app have access to its app-private user data, which is obviously not secure.


Original Post:

AFAIK on the latest Android, apps no longer can access internal storage. Which is Chrome will say access denied. Even if you try to open it by yourself with html viewer, it can only access just what you open excluding other files that linked.

Try to use HTTP server. Here's some option to install on Android

  • Use Termux and install Apache HTTP server. in this one, you have more control, because Termux will act as Linux environment. but quite not user-friendly to setup.
  • Spck Code Editor. It is not an http server. It's a code editor based on Monaco Editor (I guess), the same that used on VSCode (but don't expect to have full compatibility with VSCode, because it just the syntax hightlighting and the autocomplete thing). But, it also have built in support to preview HTML.
  • AWebServer, a wrapper for Apache HTTP Server and PHP.
  • KSWeb, a wrapper for Lighttpd, Apache HTTP Server, and NGINX for Android.

screenshot

1
  • 1
    I assume you are referring to the "Scoped Storage in Android 11". But in this case I assume it is simply that Google has disabled the file:// protocol by default as it made it possible to browser and download files from the app-private directories. Not sure when this limitation was introduced.
    – Robert
    Feb 16, 2021 at 8:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .