Table of Contents
A plugin that abstracts fitness and health repositories like Apple HealthKit or Google Fit.
GitHub Source Code: https://github.com/dariosalvi78/cordova-plugin-health
Requires Cordova plugin:
cordova-plugin-health
Supported Platforms #
- Android
- iOS
Usage #
this.health.isAvailable()
.then((available:boolean) => {
console.log(available);
this.health.requestAuthorization([
'distance', 'nutrition', //read and write permissions
{
read: ['steps'], //read only permission
write: ['height', 'weight'] //write only permission
}
])
.then(res => console.log(res))
.catch(e => console.log(e));
})
.catch(e => console.log(e));
See description at https://github.com/dariosalvi78/cordova-plugin-health for a full list of Datatypes and see examples.