Incode Systems Logo Incode Systems, Inc.
www.incodesystems.com
Please E-mail: webmaster [at] incodesystems.com if you have information to contribute.
(Last modified: Monday, September 4, 2017 1:41 pm)

Local Files


There are many reasons to put files on your local android device storage. You may have reference files containing information you want to view on your phone even when you do not have internet access.

HTML5 may be used to create apps that look and act like native apps and may be stored in local storage. Android browsers usually allow you to open a local file and bookmark it. A local file is addressed like this:

file:///sdcard/Documents/Contacts.htm

The example above opens the file Contacts.htm in the Documents folder of the main device storage.

Once you have a number of useful files stored on your phone, you will want to access them quickly. You could tap on the browser shortcut, tap on the browser menu, tap on the Bookmarks menu selection, and, finally, tap on the bookmark to the file. What would be better is to tap on a shortcut that opens the file with a single tap.

Shortcuts to Local Files


Some browsers have a menu selection that creates a shortcut on the Home Screen for the page you're are viewing. This method worked fine for example on the Samsung S4 browser prior to version 4.0.10-53. Now that menu selection is not available if the file you are viewing is local. Testing with Chrome version 49.0.2623.105 finds that Chrome will create the shortcut, but an error is displayed when you try to use it.

ES File Explorer is a free Android app that does many useful things including creating shortcuts to local files. Testing (version 4.0.4.9) revealed that while it does create shortcuts to local HTML files, an error is displayed when you try to use the shortcuts with a browser. They only work if you select HTML Viewer as the app to open the file.

xShortcut is a free Android app that allows you to create shortcuts to local files. You may also specify the application that will open the file. Other shortcuts to local files may require you to select the app to use. While you may specify that your selection be the default for the file type, you may not want define a default. xShortcut also allows you to specify the name of the shortcut and the icon.

Open xShortcut and tap on Edit Your Shortcut.
Leave all the fields blank except these:

FieldValue
Shortcut Name and IconContacts
Component Packagecom.android.chrome
Component Class (FQN)com.google.android.apps.chrome.Main
Data (URI)file:///sdcard/Documents/Contacts.htm

Tap OK to create shortcut.

The shortcut defined above will open Contacts.htm using Chrome.