I’m using the Expo Pedometer:(https://docs.expo.io/versions/latest/sdk/pedometer/), and have a working step-counter which works well on one page of my app.
It counts up as expected as I walk when i hold my phone with the screen open, using state to store the currentSteps. However, when I turn my phone screen off/lock my phone, the steps do not go up as I walk - it only works if i have the screen open.
I have been reading about Expo Task Manager: https://docs.expo.io/versions/latest/sdk/task-manager/ but really have not much of an idea how I should even go about this…
If you would like to see my current code I am happy to provide it but it is essentially the example code from the expo pedometer docs.
My goal is to have the pedometer count the user’s steps no matter if the app is open or not; so when the user checks the app, they can see their daily steps from within the app in real time.