Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen Time integration #215

Open
danielmehring opened this issue Jan 28, 2024 · 3 comments
Open

Screen Time integration #215

danielmehring opened this issue Jan 28, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@danielmehring
Copy link

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
Copy link
Author

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

@jkuester jkuester added the enhancement New feature or request label Jan 31, 2024
@jkuester
Copy link
Owner

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:

  • The Android system already has the data we want. If we can find the right apis to call, maybe we can get that data. For example, the usage api seems to provide quite a bit of relevant data!
  • Alternatively, we could try to work with a project like ScreenTime and see if they would be willing to provide an intent interface that Unlauncher could use to retrieve the screen usage data recorded by that app. In this case, you would need both Unlauncher and ScreenTime installed, but then you would be able to see your ScreenTime stats displayed on the Unlauncher home screen.

@danielmehring
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants