The front end implementation of Evergreen involves the Javascript logic that will check, download, install, and restart the app when changes are made.
Evergreen Steps
There are four steps to an evergreen update:
Check for updates, download the update, install the update, restart the app for the changes to take affect. These can be automated, or even chained together or done in the background, however for this example each step will be done manually, allowing you to see each step and identify each part of the code that handles that particular step.
Evergreen Update Example
The following is a basic example of Evergreen functionality within a BlinkMobile hybrid app.
...
Firstly, you can download a full example below, and then we'll go through each part.
Download an Evergreen "www" Example
The following ZIP file contains the "www" folder of the example app, including Evergreen functionality:
Explanation of the Code
Inside the ZIP you'll find a basic app. The two files in particular we're interested in are the following:
index.html
The index.html file is a basic example showing a HTML interface that will allow a user to click on a button to check for updates, download them, install them, and then restart the app.
Each element is HTML only, with some CSS styling. Depending on the framework you're using, ideally you will replace these with elements or components that match your look and feel.
js/update.js
The update.js file is the file that handles the actual functionality.
...
This is all you need to edit in this file.
Next Step
Creating an Evergreen Update
...