Android StepCounter stops working after device is put to sleep

I am currently trying to implement the Input System’s step counter which seems to work when the app starts. However when the device is put to sleep and woken up again, the step counter doesn’t update anymore. It seems to just have the last set value when the device went to sleep. I an use this line of code to query the step counter:

StepCounter.current.stepCounter.ReadValue();

Is this the correct method, or is there additional configuration I need to do at start or whenever the device wakes up again? I do want to get all steps counted, including when the device went to sleep while the app was running.

Currently using Unity 2019.4.21f1 and Input System 1.0.2.

I updated to 1.1.0-Preview.3 of the Input System, and that seemed to resolve the issue. And checked for StepCounter.current != null.

Hey guys, actually I am using the NatSteps for counting the steps in IOS and Android. It is working for the IOS but not working for Android. Can you just tell me, what are you using for steps count and which platform it targets (like android or IOS)? I need your help to implement this in my android app.
Thanks in Advance.