开发者

AlarmManager problems when changing the system clock

I have a service that updates some data every minute. When I change the system clock of the phone or 开发者_如何转开发the emulator, the timer executes immediately n times with no delay between them.

Let's suppose that it is 10:00 pm. If I change the time to 11:00pm, the timer runs 60 times one by one with no delay between each run. My service generates HTTP requests so it'll trigger 60 request one by one for 4-5 secs.

What is wrong? I have got the same issue with the AlarmManager too. How can I prevent this behavior?


There is an issue for this

http://code.google.com/p/android/issues/detail?id=17486


if u change system time before u have to cancel PendingIntent and restart it

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜