We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const permissions = [ { kind: Fitness.PermissionKinds.Steps, access: Fitness.PermissionAccesses.Read }, { kind: Fitness.PermissionKinds.Steps, access: Fitness.PermissionAccesses.Write }, { kind: Fitness.PermissionKinds.Distances, access: Fitness.PermissionAccesses.Read }, { kind: Fitness.PermissionKinds.Distances, access: Fitness.PermissionAccesses.Write }, { kind: Fitness.PermissionKinds.Calories, access: Fitness.PermissionAccesses.Read }, { kind: Fitness.PermissionKinds.Calories, access: Fitness.PermissionAccesses.Write }, { kind: Fitness.PermissionKinds.HeartRate, access: Fitness.PermissionAccesses.Read }, { kind: Fitness.PermissionKinds.HeartRate, access: Fitness.PermissionAccesses.Write }, { kind: Fitness.PermissionKinds.Activity, access: Fitness.PermissionAccesses.Read }, { kind: Fitness.PermissionKinds.Activity, access: Fitness.PermissionAccesses.Write }, { kind: Fitness.PermissionKinds.SleepAnalysis, access: Fitness.PermissionAccesses.Read }, { kind: Fitness.PermissionKinds.SleepAnalysis, access: Fitness.PermissionAccesses.Write }, ]; Fitness.requestPermissions(permissions) .then(async(authorized) => { const result = await check(PERMISSIONS.ANDROID.ACTIVITY_RECOGNITION) console.log("RESUL",result); console.log('presss', authorized) let y = new Date().getFullYear(); let m = new Date().getMonth(); let d = new Date().getDate(); var convertStartdate = new Date(y, m, d); var convertEndDate = moment().endOf('week').toDate(); Fitness.getSteps({ startDate: convertStartdate, // required endDate: new Date().toISOString(), // required }).then((res) => { console.log("getSteps", res); }); Fitness.getDistances({ startDate: convertStartdate, // required endDate: new Date().toISOString(), // required }).then((res) => { console.log("getDistances", res); }); Fitness.getCalories({ startDate: convertStartdate, // required endDate: new Date().toISOString(), // required }).then((res) => { console.log("getCalories", res); }); }) .catch((error) => { // // Do something });
Here above is the code, i'm unable to run in ios and app getting crash. Please provide me some solution.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: