Could anyone please help with my requirement ?
I have created a new hybrid application with healthkit plugin, but I can't see an example anywhere to query the heartRate data from IOS healthkit using the plugin. I tried to write my own JS
function queryHeartRate() {
window.plugins.healthkit.queryHeartRate(
{
'startDate': new Date(new Date().getTime() - 4 * 24 * 60 * 60 * 1000), // four days ago
'endDate': new Date(), // now
'quantityType': 'HKQuantityTypeIdentifierHeartRate',
'limit': '600',
'unit': 'bpm' // make sure this is compatible with the sampleType
},
function (value) {
alert("Heart Rate result " + value);
},
callback
);
}
But its not working. Cant see the results. I have checked the IOS examples to query the heartrate data and the params are right.
I have seen the sample application build (https://github.com/Telerik-Verified-Plugins/HealthKit/). But not much related to heartrate data.