You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Error happen with getHeartRate method
while the othes methods are working fine after sign in and allow permissions (permission HeartRate included).
let currentDate = new Date();
let start = new Date(2021, 1, 1, 0, 0, 0);
let end = new Date( currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate(), 23, 59, 59,);
This Error happen with
getHeartRate
methodwhile the othes methods are working fine after sign in and allow permissions (permission HeartRate included).
const permissions = [
{
kind: Fitness.PermissionKinds.Steps,
access: Fitness.PermissionAccesses.Read,
},
{
kind: Fitness.PermissionKinds.Calories,
access: Fitness.PermissionAccesses.Read,
},
{
kind: Fitness.PermissionKinds.Distances,
access: Fitness.PermissionAccesses.Read,
},
{
kind: Fitness.PermissionKinds.HeartRate,
access: Fitness.PermissionAccesses.Read,
},
];
let currentDate = new Date();
let start = new Date(2021, 1, 1, 0, 0, 0);
let end = new Date( currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate(), 23, 59, 59,);
const getHeartRate = () => {
Fitness.getHeartRate({ startDate: start, endDate: end, interval: 'days' })
.then((res) => {
console.log('getHeartRate', res);
})
.catch((e) => {
console.log('error', e);
});
};
The text was updated successfully, but these errors were encountered: