Closed SUPERCILEX closed 4 years ago
Currently, we do it whenever the user is signed in: https://github.com/SUPERCILEX/Robot-Scouter/blob/c28662f70a6085e20549d6a68bdea77e25e7090d/library/core-data/src/main/java/com/supercilex/robotscouter/core/data/Database.kt#L163-L168
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.
ProcessLifecycleOwner
Currently, we do it whenever the user is signed in: https://github.com/SUPERCILEX/Robot-Scouter/blob/c28662f70a6085e20549d6a68bdea77e25e7090d/library/core-data/src/main/java/com/supercilex/robotscouter/core/data/Database.kt#L163-L168
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.