already managing a googleapiclient with id 0 react native


#1

hey,
ive created an app using exp XDE which consists of pedometer.
when ever am trying to access the Pedometer, for the first time access, it works fine but if I reload it I get this red screen saying

already managing a googleapiclient with id 0 react native

I don’t know why exactly that happens and when I restart the whole app, then it works for the first time and if I reload it after making any changes, again the same error.
please help me with this.
thank you in advance


Pedometer - Already managing a googleapiclient with id 0 react native (again)
#2

Hey @wexpo!

I’m not super familiar with Pedometer issues, but it would be nice to see some example code so we could help you diagnose the issues.

In the documentation we’re not explicit about removing the listener for pedometer and adding it back, have you tried doing that at all? https://docs.expo.io/versions/latest/sdk/pedometer has a snack where there is an unsubscribe section of code.


#3

Hey @jimmylee,
thanks for the response

for the sample code you’ve asked i’ve used the same code provided at expo pedometer documentation
Pedometer Expo but i still find the issue, and am using the subscribe and unsubscribe as given.

and one thing is, the first time I run the app in expo client app or Android emulator, it works fine, from the second try, the error pops up.


closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.