Android 闹钟被其他应用取消
Android alarm canceled by another apps
我是使用 AlarmManager
的 android 应用开发者
PendingIntent pendingIntent = PendingIntent.getService(FleetRefreshNotiService.this, 1, givenIntent, PendingIntent.FLAG_CANCEL_CURRENT);
AlarmManager.AlarmClockInfo clockInfo = new AlarmManager.AlarmClockInfo(timeWillbe, pendingIntent);
mAlarmManager.setAlarmClock(clockInfo, pendingIntent);
并且我正在使用我的应用程序。和塔斯克(https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)
- 当我使用 Tasker 时,启用。
- 我在 Tasker 应用程序的 "Disable Tasker" 上有标签。 (它看起来消除了 tasker 的警报..?)
- 然后,我的闹钟就取消了。
adb shell dumpsys alarm
签出
批次{2df386 num=1 start=598017988 end=598017988 flgs=0x3}:
RTC_WAKEUP #0: 警报{367b447 在 1551056248419 jc01rho.ogame.alarm.ognotifier.debug 时输入 0}
tag=walarm:com.myapp.debug/com.myappNotiService
type=0 whenElapsed=+1m24s525ms when=2019-02-25 09:57:28
window=0 重复间隔=0 计数=0 标志=0x3
闹钟:
触发时间=2019-02-25 09:57:28
showIntent=PendingIntent{1ff9474: PendingIntentRecord{c8fe766 com.myapp.debug startForegroundService}}
operation=PendingIntent{ec5bd9d: PendingIntentRecord{c8fe766 com.myapp.debug startForegroundService}}
"Disable Tasker"
后已失踪
我应该如何保持 "Disable Tasker" 的闹钟?
我找到了答案,留给和我有同样问题的人吧。
AlarmManager.AlarmClockInfo clockInfo = new AlarmManager.AlarmClockInfo(timeWillbe, pendingIntent);
有错
请将 null 设置为 AlarmClockInfo 的 PendingIntent 参数。
修正为
AlarmManager.AlarmClockInfo clockInfo = new AlarmManager.AlarmClockInfo(timeWillbe, null);
很抱歉我不知道原因。请某人更新此原因。
谢谢。
我是使用 AlarmManager
PendingIntent pendingIntent = PendingIntent.getService(FleetRefreshNotiService.this, 1, givenIntent, PendingIntent.FLAG_CANCEL_CURRENT);
AlarmManager.AlarmClockInfo clockInfo = new AlarmManager.AlarmClockInfo(timeWillbe, pendingIntent);
mAlarmManager.setAlarmClock(clockInfo, pendingIntent);
并且我正在使用我的应用程序。和塔斯克(https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)
- 当我使用 Tasker 时,启用。
- 我在 Tasker 应用程序的 "Disable Tasker" 上有标签。 (它看起来消除了 tasker 的警报..?)
- 然后,我的闹钟就取消了。
adb shell dumpsys alarm
批次{2df386 num=1 start=598017988 end=598017988 flgs=0x3}: RTC_WAKEUP #0: 警报{367b447 在 1551056248419 jc01rho.ogame.alarm.ognotifier.debug 时输入 0} tag=walarm:com.myapp.debug/com.myappNotiService type=0 whenElapsed=+1m24s525ms when=2019-02-25 09:57:28 window=0 重复间隔=0 计数=0 标志=0x3 闹钟: 触发时间=2019-02-25 09:57:28 showIntent=PendingIntent{1ff9474: PendingIntentRecord{c8fe766 com.myapp.debug startForegroundService}} operation=PendingIntent{ec5bd9d: PendingIntentRecord{c8fe766 com.myapp.debug startForegroundService}}
"Disable Tasker"
后已失踪我应该如何保持 "Disable Tasker" 的闹钟?
我找到了答案,留给和我有同样问题的人吧。
AlarmManager.AlarmClockInfo clockInfo = new AlarmManager.AlarmClockInfo(timeWillbe, pendingIntent);
有错
请将 null 设置为 AlarmClockInfo 的 PendingIntent 参数。
修正为
AlarmManager.AlarmClockInfo clockInfo = new AlarmManager.AlarmClockInfo(timeWillbe, null);
很抱歉我不知道原因。请某人更新此原因。
谢谢。