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

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

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

       public void onFinish() {
          //Logout
       }
    };

When user has stopped any action use timer.start() and when user does the action do timer.cancel().
 
Share this answer
 
v3
This site does not do code-to-order. If you want someone to write code for you I suggest you try Freelancer.com.
 
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