Unhandled Promise Rejection (id: 0). Unauthorized GoogleFit. #107
Answered
by
lukebars
emirrtopaloglu
asked this question in
Q&A
-
I'm getting an Unauthorized error. This error only happens on Android. What should I do? Could you help me? My Code: const permissions = {
healthReadPermissions: [HealthKitDataType.StepCount],
googleFitReadPermissions: [GoogleFitDataType.Steps],
};
const getStepsToday = async () => {
const authorized = await FitnessTracker.authorize(permissions);
console.log(authorized);
if (!authorized) return;
const stepsToday = await FitnessTracker.getStatisticTodayTotal(
FitnessDataType.Steps,
);
console.log(stepsToday);
setSteps(stepsToday);
};
useEffect(() => {
getStepsToday();
}, []); Error:
|
Beta Was this translation helpful? Give feedback.
Answered by
lukebars
Nov 21, 2022
Replies: 1 comment 4 replies
-
Hey @emirrtopaloglu. Just checking, have you completed the android setup? |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
emirrtopaloglu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @emirrtopaloglu. Just checking, have you completed the android setup?