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

Move last sign in update to ProcessLifecycleOwner onCreate #292

Closed
SUPERCILEX opened this issue Feb 25, 2020 · 0 comments
Closed

Move last sign in update to ProcessLifecycleOwner onCreate #292

SUPERCILEX opened this issue Feb 25, 2020 · 0 comments
Labels
bug Something isn't working feature:database Involves the database

Comments

@SUPERCILEX
Copy link
Owner

Currently, we do it whenever the user is signed in:

FirebaseAuth.getInstance().addAuthStateListener {
val user = it.currentUser
if (user != null) {
updateLastLogin.run()
}
}

This is a problem because something like app indexing will periodically wake up our app even if the user isn't actually using it. ProcessLifecycleOwner will make sure at least one activity is open before we update user presence.

@SUPERCILEX SUPERCILEX added bug Something isn't working feature:database Involves the database labels Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature:database Involves the database
Projects
None yet
Development

No branches or pull requests

1 participant