Availablility & Updates
This is required on Android Health Connect but can be skipped if you are developing for iOS only.
Check for Updates
On Android you will need to ensure the Health Connect application is installed and available for the user.
- AIR
- Unity
You can do this by checking the isUpdateRequired() function:
var updateRequired:Boolean = Health.instance.isUpdateRequired();
You can do this by checking the IsUpdateRequired() function:
bool updateRequired = Health.Instance.IsUpdateRequired();
If this returns true then you must redirect the user to update (or install) the health connect functionality on their device.
Updating Health Connect
In order to update (or install) Health Connect you can call the use the update method of the extension. This will redirect the user to the appropriate location in the store or settings to install or update the health connect functionality.
- AIR
- Unity
You can do this by calling update()
Health.instance.update();
You can do this by calling StartUpdate()
Health.Instance.StartUpdate();
You must do this before any other functionality in the extension will operate correctly.