It is fun to share apps you create with others. To make your work available to others, the most simple option is to put your HTML and JavaScript files on a web server and run the app using Evothings Viewer (estimated time 15 minutes).
Evothings Viewer is a bit like a web browser for IoT. You can use it to run apps hosted on a web server. This is useful for testing and for quickly sharing apps for evaluation.
Here is how to run your app in Evothings Viewer:
Upload HTML, CSS, JavaScript and media files (images) to a web server. Note that you don't need to upload any Cordova JavaScript files. The file cordova.js and Cordova plugin files are bundled with Evothings Viewer.
Install and run Evothings Viewer on your mobile device.
Enter the URL to the main HTML file on the web server in the connect field and press the Connect button.
For example, if you have
index.html in the folder "demo", you can enter a url like this (just as with a web page!): http://evothings.com/demo
The protocol defaults to http://
so you can just type: evothings.com/demo
When using https://
you need to specify this explicitly in the URL.
You can also make a menu page with links to all of your apps, and open that page in the Viewer.
The drawback is that the user must be online to run the app.
The positive thing is that it is very quick and easy to share apps with others. Just ask them to install Evothings Viewer and supply a URL to your app or start page.
A potential problem is that Evothings Viewer may not load the most recent files when your app code has been updated on the web server. Testing we have done indicates iOS does not cache apps, but Android does.
The current solution is to include the following meta tags in the head section of index.html, this makes Android not cache the app (works well on iOS too):
<meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="expires" content="-1" />
If you have published apps without the above tags, the users have to clear the web cache on Android to get the new version. Go to Settings/Apps/Evothings and select "Clear data" to clear the cache.
You can also put a Reload button in the app (which can be useful during development):
<button onclick="window.location.reload(true)">Reload</button>
If you have several apps you wish to share, make an index page that acts like a menu or gallery you can use as a launchpad (just put links to your apps on the menu page, as you would for any web page).