mpcjanssen / simpletask-android

GNU General Public License v3.0
551 stars 128 forks source link

Add 'Habit Mode' feature to optionally show app after screen unlock #1222

Open jcrutland opened 1 year ago

jcrutland commented 1 year ago

Adds 'habit mode' which is intended to optionally remind users to attend to their todo list regularly.

Added foreground service to reliably receive USER_PRESENT. Added enable checkbox to Settings/Features. Added permission check/get/test on change of setting.

Could be extended to choose filter etc in settings.

Tested in emulator (API 30) and on my Samsung S22 (Android 13) for a few days.

smichel17 commented 1 year ago

Thanks for being interested in contributing! However, I wonder if this needs to be a part of Simpletask. Seems like it could be a separate 'Habit Creation' app and function just as well (and could be easily extended to work with other apps!)

jcrutland commented 1 year ago

Thanks for looking at my PR. I agree it might be neat to have this sort of capability as a general app - I did a brief search to see if there is something in fdroid that does this already and I didn't find anything that matches exactly so maybe there is a gap for something new.

I personally have found this feature useful in Simpletask and I'll keep using it; I think it has helped me make better use of my screen time by interrupting the reflex to scroll the news or whatever. If you think it might in its present form be a bit of a blunt instrument, maybe a slightly different presentation would be more suitable? Instead of showing Simpletask on screen unlock, it instead (when enabled) shows a brief reminder notification prompt to open Simpletask?