I am new to Android app development. I have a little problem. While working on his Android application, by clicking on the "Home" button , the application goes back to the background again if you go to "Home" and click the icon of my application to start again from mine last viewed Activity(screen). So far, his fine, and not the last screen viewed, here I want to Automatically log out , and it should show a message like " Your session timed out. Please log in again " or redirect to the login page"Then check the credentials and allow the user to continue the same application. I support all user credentials, for example, email address, username, password and user ID through my application using the general settings. How to achieve this automatic exit from the application in a few hours, if it is in the background in android or if the application is not used by the user or remains inactive for some time?
Waiting for your suggestion ???
source
share