I want to know when a user exits a certain activity, such as by: - Navigating to another activity within the same app - Exiting the app - Putting the phone to sleep
What are ways to detect the above, and maybe other possibilities?
I want to know when a user exits a certain activity, such as by: - Navigating to another activity within the same app - Exiting the app - Putting the phone to sleep
What are ways to detect the above, and maybe other possibilities?
You can simply use LifeCycle events such as onDestroy() or onStop() you can override them in your activity