MiCode / Notes

小米便签社区开源版(Community edition of XM notepad/MIUI notes)
http://micode.net/forum-38-1.html
2k stars 912 forks source link

AlarmReceiver时钟提醒延时 #20

Open wuyisheng opened 9 years ago

wuyisheng commented 9 years ago

net.micode.notes.ui.AlarmReceiver 安装完,第一次设置时钟是准的,第二次有一点偏差,第三次开始就是延时5分钟,从此之后定时提醒不准

pihunwang commented 9 years ago

恩,代码貌似是有点问题,是帮学校一个搞ACM写的,后续没没有跟进。

heweiwei commented 8 years ago

这里alarm不是精确的 alarmManager.set(AlarmManager.RTC_WAKEUP, alertDate, pendingIntent); 现在很多厂商都有做alarm对齐的优化。 alarmManager.setExact 改用这个试试会不会更好一点。