My android app has a main login screen and various screens which follow. I want to create a session timeout dialog which shows up when: 1) the user is on any page except the login page and 2) the user has not interacted with the application for 5 minutes.
The session timeout dialog should have a logout button which takes the user back to the login screen. How do I do this?