I am creating a step counting app, when I trying it on my mobile phone, I found that it stopped timming and doesn't continue counting when i switched off my mobile's screen in order to save power. And it count again when i switched the screen on again. How should I add more blocks to solve this problem?
Thanks for any helping !
Since it is treated as fresh start.
No any benefit, just for my own use, i don't want to use other apps since they have many annoying advertisement.
I don't close my app, i just switched off my mobile screen and let it run, as i walk for 1 hour, i don't need to watch my mobile every minutes.
You either need a foreground service [FREE] Pedometer with Foreground Service or a StayAwake routine. When your device goes to sleep, it cannot count the steps.
Here is how you might code a Stay Awake block routine using a Notifier
or you could use Taifun’s Tools Extension: https://puravidaapps.com/tools.php
Using either an extension or a block routine drains your device battery rapidly . These work around methods are not running the app in the Background, they force the app
screen to stay open .
Thank You very much, your answer is really what i want, i appreciate you for your help !
you might want to try
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.