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

screentime when shutdown #1

Closed
marceltransier opened this issue Jan 22, 2022 · 3 comments
Closed

screentime when shutdown #1

marceltransier opened this issue Jan 22, 2022 · 3 comments

Comments

@marceltransier
Copy link

The app appears to have counted shut down time as screen time. Maybe when the phone shuts down the screen is on and then the apps are being killed without sending the standby signal to the app. Maybe there is also a way to listen for shutdown events? (https://developer.android.com/reference/android/content/Intent#ACTION_SHUTDOWN)

@markusfisch
Copy link
Owner

Good catch! Thanks for making me aware of this! 👍 Will investigate…

@markusfisch
Copy link
Owner

Version 1.0.7 listens for ACTION_SHUTDOWN now (see 3e2934a).

Unfortunately, not all of my devices send ACTION_SHUTDOWN when shutting down (or rebooting) so the bug is not fixed for everyone 😬 But I'm still on it and I think I can find a solution. This is just a first step.

@markusfisch
Copy link
Owner

Version 1.0.8 doesn't depend on a closing event anymore. Now, the current session is updated with the ongoing notification and, finally but not necessarily, when there's a ACTION_SCREEN_OFF event.

So even a power loss wouldn't result in an open record anymore.

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

No branches or pull requests

2 participants