OvalMoney / react-native-fitness

A React Native module to interact with Apple Healthkit and Google Fit.
MIT License
341 stars 68 forks source link

getDistance not working #71

Closed IronTony closed 3 years ago

IronTony commented 3 years ago

Hi all,

I was trying to using the permission and the method getDistance unfortunately the permission is not asked, just the permission for the steps, so neither the value is visible and usable

geekmidas commented 3 years ago

@IronTony Did you manage to get it working?

IronTony commented 3 years ago

@geekmidas nope, I used other 2 packages: rn-apple-healthkit for iOS and react-native-google-fit for Android

IronTony commented 3 years ago

You can try react-native-permissions but I preferred to go the other way. Best of luck

geekmidas commented 3 years ago

@IronTony I tried using react-native-google-fit but it was the same issue on my side, it did not ask for permissions as well

IronTony commented 3 years ago

@geekmidas mmmm strange. I did this:

onst googleFitFlow = useCallback(async () => {
    await GoogleFit.checkIsAuthorized().then(() => {
      GoogleFit.authorize(googleFitOptions)
        .then((authResult) => {

and it is working fine.

Just a quick hint, I think that this is not the right place to talk about another package 😉

geekmidas commented 3 years ago

@IronTony Thanks for the hint. Do you mind if I contact you privately on the email you have on GitHub?

IronTony commented 3 years ago

@geekmidas sure no problem

geekmidas commented 3 years ago

Thanks man @IronTony I sent you an email.