活动15分钟后自动注销的android代码 [英] android code for auto logout after 15 minutes of in activity
本文介绍了活动15分钟后自动注销的android代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
android code for auto logout after 15 minutes of in activity
推荐答案
我们不提供此处的完整代码。你可以使用CountDownTimer。
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() {
//Logout
}
};
当用户停止任何动作时,使用timer.start(),当用户执行动作时,执行timer.cancel()。
When user has stopped any action use timer.start() and when user does the action do timer.cancel().
此站点不按订单执行。如果您希望有人为您编写代码,我建议您尝试使用Freelancer.com。
This site does not do code-to-order. If you want someone to write code for you I suggest you try Freelancer.com.
这篇关于活动15分钟后自动注销的android代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文