Re:Show HN: StepLock – Unlock Android apps by walking
by choochootrain on Monday July 04, 2016 @08:53PM
(#12033811)
cool idea! how are you locking out the apps? my first thought is the SYSTEM_ALERT_WINDOW permission which lets you draw over other apps but maybe theres a better way to do this in the new APIs.
Re:Show HN: StepLock – Unlock Android apps by walking
by MegaLeon on Tuesday July 05, 2016 @05:20AM
(#12035272)
Thanks! It's quite simple actually - what I do is monitoring the current app in the foreground with a background service and when the package name (unique to each app) matches the one in the app database, StepLock fires up.
Just add any of your apps to the block list and set the number of steps you need to walk that day. StepLock will monitor your usage and won't let you use the app until you walked that specific amount.
The only thing is that the app use the "new" generation step detection sensors which are designed to be low power and have a minimal impact of battery, and are only present on newer-ish phones. Sorry in advance if the app is not compatible with your device.