I hope it exists.
I would like to save the time when the application loses focus, and then check if it has lost focus for more than n minutes to cause blocking.
Having seen how an application consists of actions, I think that there will be no direct equivalent. How could I achieve similar results?
EDIT
I tried to extend the Application class to registerActivityLifecycleCallbacks()and realized that I could not use this approach, because it is only available in API Level 14 +
source
share