簡單的演示項目的GitHub後不見了:https://github.com/Try4W/AlarmManagerDemoAlarmManager:從的PendingIntent最近的應用程序在某些設備上刷卡應用
在仿真器(安卓4.1.1,安卓6):
- 我安排新的
PendingIntent
與AlarmManager
通過adb shell dumpsys alarm
- 檢查活動報警,看我
Intent
- 關閉App通過通過
adb shell dumpsys alarm
- 最近應用刷卡它
- 檢查活動報警,看我
Intent
- BroadcastReciver開火時間!
在我的設備(樂視網單/安卓6):
- 我通過
adb shell dumpsys alarm
- 與
AlarmManage
- 檢查活動報警,調度新
PendingIntent
看到我Intent
- 關閉App通過從最近的應用程序中刷卡
- 通過檢查活動警報
- 沒有看到在所有
我Intent
Intent
從最近使用的應用程序刪除後不會被刪除。 但是!在我的設備AliExpress的應用程序發佈通知,而不添加到「受保護的應用程序」。
注:報警調度沒有問題的BOOT_COMPLETED
他們是如何做到這一點?
我已經嘗試過:
- 設定的報警通過
alarmManager.setAlarmClock(...)
- 設定的報警通過
setExactAndAllowWhileIdle(...)
- 使用意向過濾器,以
Service
在分離過程 運行執行
- 設定的鬧鐘
BroadcastReciever
利用「保護應用」一些手機制造商必須添加到列表中自動 –
@nickfriskel這是奇怪的行爲喜愛和信賴的應用程序。第三方警報應用程序如何工作而不在「白名單」中? – Alexandr