Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This guide is currently In-Progress. Over the next few months, content will be added to it. 

If you have any suggestions or would like to add pages which talk about the functionality of Bahmni, please feel free to add them.

Introduction

The offline metadata file present on the server decides whether the offline app in the devices needs to be upgraded or not.

The offline metadata file looks like this:

offlineMetadata.json
{
    "latestAndroidAppUrl": "https://www.dropbox.com/s/url/for/android/apk",
    "latestChromeAppUrl": "https://www.dropbox.com/s/url/for/chrome/app",
    "compatibleVersions": [0.79, 0.80]
}

When the device is connected to network, it reads the metadata file and determines whether it has a update. If there is an update, 'Update' button will be shown in the header next to 'Sync' button. The offlineMetadata.json is present at `/var/www/html/offlineMetadata.json'.

There are two kinds of update:

  1. Forced update - this means that installed version in device is not compatible with server and it needs to be upgraded for the data to get synced to server. In this case, each time the app tries to sync data to the server, it shows a popup which has  link/button to upgrade the app.
  2. Non-forced update - this means that installed version in device is still compatible with server and it need not be upgraded immediately to get data synced. In this case, sync happens smoothly even if app is not upgraded.

Upgrading the Android App

For the Android app, the 'latestAndroidAppUrl' in the offlineMetadata.json contains the url of latest apk released. On clicking the Update button, the apk is downloaded from the specified url in offlineMetadata.json and installed automatically.

Upgrading the Chrome App

For Chrome app, the 'latestChromeAppUrl' in the offlineMetadata.json contains the url from where the chrome extension tar file can be downloaded. On clicking the Update button, the link with the url is shown so that extension can be downloaded and installed manually.

To install the extension manually, the tar file has to be unzipped and put in the location from where extension is loaded.

The extension should not be deleted from chrome browser to update the app. Deleting the extension deletes the data as well.

On this Page

Related Pages

Unable to render {children}. Page not found: Installing and Configuring Offline.

Feature Details
Usage Details
  • No labels