jkuester / unlauncher

Android minimalistic launcher
https://jkuester.github.io/unlauncher/
MIT License
305 stars 47 forks source link

Screen Time integration #215

Open danielmehring opened 7 months ago

danielmehring commented 7 months ago

I would love to have this feature/enhancement:

The app uses an SQLite database to log every turn on/off of your screen (and if possible) which apps are open for how long. This screen time should be able to be displayed as an extra option for the clock.

Logging the time for certain apps makes more features like time limits possible.

For the implementation I would take a look at this repo: ScreenTime

danielmehring commented 7 months ago

Oh and I would do it. So if it gets accepted, please assign me :)

jkuester commented 7 months ago

I like the idea of being able to see screen time on the home screen! The tricky part here, though, is that I do not think it would be a good idea for Unlauncher to be responsible for collecting the stats about screentime/app-usage (recording how long the screen has been active and which apps were launched when...). That would be a comparatively large addition of code/functionality that would need to be maintained going forwards for a feature that is compatible with the Unlauncher philosophy, but not really core to its functionality.

So, I think the feasibility of this feature is going to depend on if we can find a way to access the data to display without having to collect and store a historical database of screen events. A couple thoughts I had (have not had time to dig deep yet) of where we might be able to get the data:

danielmehring commented 7 months ago

I just noticed that there is a clock type of date that is not selectable, but would appear if nothing was selected. I will add this date option for the clock type along with the screen time option.