2

I have built my app which includes a the expo pedometer app. The pedometer works in expo, but has issues when built/standalone. Knowing from the expo docs that I needed to configure OAuth for google fit, I tried to do so.

I selected "Get a Client ID" from:

https://developers.google.com/fit/android/get-api-key

Selected an existing project that I was using for google authentication. "Fitness API has been enabled. Next, to use the API you'll need the right credentials."

Selected Fitness API and that I'd be accessing it from Android. Additionally I choose user data. When I go to select credentials it tells me I already have credentials fit for purpose.

I select Done but my pedometer component still gives values that haven't been updated. Pedometer.isAvailableAsync() as written in the expo docs:

https://docs.expo.io/versions/latest/sdk/pedometer/

never has it's state updated from checking. Am I missing something?

I have tried looking at this:

https://forums.expo.io/t/pedometer-fails-after-building-standalon-app/4470/2

But when I try the command:

keytool -list -printcert -jarfile growler.apk | grep SHA1 | awk '{ print $2 }'

in the directory with my apk (currently downloads), it tells me grep isn't a recognized command.

Thanks in advance for your help, I'm fretting this a bit! For context: with reference to the code in the expo docs isPedometerAvailable starts as 'checking' and never stops being in that state.

AkhinLinks
  • 51
  • 5

0 Answers0