4

I have developed a web-based HTML and Javascript app which is distributed to company mobile phones via email or USB transfer as a zip file, which I would like to set up on people's devices with a shortcut on their home screen.

However, I can't get the option in the Chrome browser to add it as a shortcut for the offline page.

The option only becomes available if, for example, I upload the package to my online webspace and then load that URL in chrome. This isn't an option, as the app will load in confidential information which I don't want online.

Are there any solutions or alternative options for this?

  • On the destination devices, do you have Root Access or not ? – M. Abdelhafid Feb 22 '18 at 12:38
2

1. Using Chrome Browser (without root)

If you are looking for a solution using Chrome app, Chrome isn't associated with Html files, thus you can't associate it with HTML files, but you can:

P.S: Allow the storage permission for the Chrome App

  • Open Chrome Browser
  • Type the path of your file Ex: file://mnt/sdcard/Documents/App/index.html
  • Goto Options Menu (Three dots on the upper right)
  • Tick the Star on the top to Bookmark the html file in Mobile Bookmarks.
  • From your launcher put the "Chrome Bookmarks" widget on the desktop to access your bookmarked local file.

2. Using Total Commander (without root)

P.S: First, Allow the storage permission for the Total Commander App

  • Install & Launch Total Commander - file manager
  • Locate your "index.html" file.
  • Tap & maintain on the index.html file.
  • From the pop-up Menu, tick the option "Create Link on Desktop"
  • Select the shortcut name.
  • Select the app used to open HTML files (I suggest to install Opera or Firefox before this)
  • Choose an Icon if you want.
  • Tap OK/ Apply.

3. Using Opera Browser (without root)

Opera Browser is a solution for your situation, maybe other browsers are also fine.

P.S: First, Allow the storage permission for the Opera App

  • Install Opera browser - news & search
  • Type the path of your file Ex: file://mnt/sdcard/Documents/App/index.html
  • Goto Options Menu (Three dots on the upper right)
  • At the bottom of the Option Menu, tick the option "Home Screen"
  • Select the shortcut name, and tap Add.
  • chrome does not show the "add to home page" menu item on local files; same happens with embedded Samsung Internet Explorer on my Samsung S7. Adding the "chrome bookmarks widget" results in adding links for ALL bookmarks, not just one. – jumpjack Jan 24 at 14:08
1

Download the page, open it in chrome, click the three dots in the top right and select 'Add to home'

Edit: Just realized, I'm using the Brave browser (free on google play) and it works. It looks a lot like Chrome so it doesn't take long to get used to it.

Edit #2: Orfox browser (Tor browser), also free, is able to do it. Just open the file and create a shortcut, just like with normal pages in chrome. This is a tor browser though, but maybe there are other browser that are lighter and also able to do it. Firefox browser also does the trick. Click the 3 dots in the top right, press page and create shortcut.

  • 1
    Nope, didn't work even with the Brave browser. 'Add to home' doesn't even appear if the file path is like file:///sdcard/Documents/App/index.html. Possibly due to the fact that a local file isn't served over https? In which case, is there an alternative...? – Andrew Abbott Feb 22 '18 at 11:09
  • Edited it with a new suggestion – Simon V. Feb 22 '18 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.