This is a duplicate of the following two issues (which have been closed so I can’t reply):
I am trying to use expo’s pedometer. I copied the
documentation example directly to my App.js created by create-react-native-app.
Yet, every time I try to reload, it always give “Already managing a GoogleApiClient with id 0” error screen.
I had tried to unsubscribe at componentWillMount, but even when I’m only using getStepCountAsync function, it will give me the same error.
Could you please help me with this? Thanks a lot.
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
There isn’t much to add to what these issues already point out.
Steps to replicate
Use an android device
Create a Pedometer app using the
documentation code Start your app via the Expo app on the android device
Make a change to your code and save - the app will reload on your phone
The error will appear
Already managing a GoogleApiClient with id 0
Only happens on Android phones
Only happens when using the expo client. Works the first time, then when you save the client reloads the app on the phone and the error occurs
I’m using a Xiaomi Note 5A
Closing and reopening the app on my phone will solve this (i.e. this is only a development bug, but a frustrating one)
Any pointers to overcome this would be great