This is by design and it's to save battery life. If the phone cannot sleep then the battery will discharge very quickly and your app will be a battery drain. I was coding a timer myself and Mark recommended that I use notification manager for long-term timing instead and it was good advice.
I suggest you re-think your approach. Here's a brief summary of the approach I took: When an android device sleeps onPause is called in your activity. Override onPause and create notifications for the events you are timing, and save the timer info into shared preferences. When your device wakes onResume is called, in Override onResume and set up the countDownTimer calculating time left using the values from shared preferences. This approach means you have more work to do, you must learn notifications, you must create intents that deal with the notifications, etc. However it will make as better end product. Hope this helps, -BB On Dec 22, 10:54 pm, optimusgeek <[email protected]> wrote: > I use CountDownTimer for counting 24hours with 1minute interval. > but It seems that the onTick() not called when device in deep sleep. > When I check the millisUntilFinished value after activating device, > The value was not match first but after few seconds, It show correct > value. > I think, when device in deep sleep, handle message from CountDownTimer > delayed, and if device activated, the last message of CountDownTimer > sent. > and after that the millisUntilFinished value is updated. > > Any solution for it? I have to use the CountDownTimer, because I need > to get the millisUntilFinished value in every 1 minute. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

