Android get list of active alarms

前端 未结 6 1047
广开言路
广开言路 2021-01-01 10:04

Is there any way to get a list of all the active alarms in the android device programmatically in our application programmatically.Just point me out to some links that can b

6条回答
  •  我在风中等你
    2021-01-01 10:28

    Short answer: you can't.

    The alarm manager gives no visibility to the alarms currently scheduled in the system. Every app that uses alarm manager must persist the state of each alarm that they set.

    However you can get a list via adb as described in this question Get list of active PendingIntents in AlarmManager. And an app could get a system dump and get the alarms that way but that would require root.

提交回复
热议问题