开发者

Android Will the CountDownTimer remain counting when device goes to sleep?

开发者 https://www.devze.com 2023-03-19 17:31 出处:网络
I am using a CountDownT开发者_如何转开发imer to log a user out of my app after a specified time. I am wondering if the Timer keeps going even if my app is sent to the background or if the phone locks

I am using a CountDownT开发者_如何转开发imer to log a user out of my app after a specified time. I am wondering if the Timer keeps going even if my app is sent to the background or if the phone locks because the user put their phone down? If anyone thinks I should use a different timer method please let me know.

Thanks


The CountDownTimer wll not work when the phone goes to sleep:

http://groups.google.com/group/android-developers/browse_thread/thread/973bcb3bb806d13?pli=1

When I stopped using wakelock, the CountDownTimer never finished. Works with wakelock though.

0

精彩评论

暂无评论...
验证码 换一张
取 消