作者sorkayi (寻找奶昔)
看板AndroidDev
标题[问题] AlarmManager lose Broadcast
时间Tue May 6 11:11:26 2014
板上各位大大好
最近写了一个闹钟 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);
感谢各位大大了
--
公告
D.
#1ByBycco (DSLR) [ptt.cc] [作品] 台湾山
→ sorkayi :白目 05/17 14:52
D.骂人白目违反 3-4 人身攻击相关规定,sorkayi 警告一次。
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.252.20.129
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/AndroidDev/M.1399345890.A.B9B.html
1F:推 sdyy:重开机没重设? 05/06 18:06
我有开 boot 的 receiver 了 应该没有问题
且手机也没有重开机
※ 编辑: sorkayi (163.29.208.2), 05/06/2014 19:19:42