[問題] AlarmManager lose Broadcast

作者: sorkayi (尋找奶昔)   2014-05-06 11:11:26
板上各位大大好
最近寫了一個鬧鐘 app 這幾天都有正常的 work
是利用到 AlarmManager setrepeating 方法去做每日的喚醒
但是今天突然就沒有收到 broadcast
所以鬧鐘就沒有正常的叫了
不知道是那裡出問題了才上來問看看各位大大們有沒有遇過
在 boradcast receiver 的地方我寫 log 會寫到 SD card
今天就沒有收到 5/6 的 broadcast
在 time change 也有寫到 receiver 去 update AlarmManager repeating
boot receiver 也有寫到 update AlarmManager repeating
不知道是什麼地方突然出問題了
Intent intent = new Intent();
intent.setClass(MyAlarmListViewController.this, AlarmReceiver.class);
PendingIntent pi = PendingIntent.getBroadcast(this,
alarm.mId,
intent,
PendingIntent.FLAG_ONE_SHOT);
if (alarm.mIsEnable != 0) {
alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP,
currentMills + alertMillis,
AlarmManager.INTERVAL_DAY, // repeat for next days
pi);
感謝各位大大了
作者: sdyy (中壢市的小智)   2014-05-06 18:06:00
重開機沒重設?

Links booklink

Contact Us: admin [ a t ] ucptt.com