Click here to Skip to main content
15,615,774 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
android code for auto logout after 15 minutes of in activity

We don't provide complete code from here. You can use CountDownTimer.
CountDownTimer timer = new CountDownTimer(15 *60 * 1000, 1000) {

       public void onTick(long millisUntilFinished) {
          //Some code

       public void onFinish() {

When user has stopped any action use timer.start() and when user does the action do timer.cancel().
Share this answer
This site does not do code-to-order. If you want someone to write code for you I suggest you try
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900