[android_alarm_manager_plus] View pending alarms
Use case
Having more than a couple alarms can get confusing to track, so it'd be a good feature to be able to track which and when alarms are going to be executed.
Proposal
Ability to view upcoming alarms and their parameters like time of their execution, its periodic duration, etc
Upon going through the docs for AlarmManager for android I found this method getNextAlarmClock. This can only return the info for next immediate alarm though. I feel even this can be a good addition to the plugin.
Edit- I was hesitant to add a dependency like shared prefs in the plugin itself, but upon going through the code I see they're already using shared preferences to manage persistent alarms. So maybe handling the data in the plugin itself is a possible solution.
I have tried a solution for this in the PR. From what I tested it is working reliably. More suggestions are welcome
@mhadaily I think this issue can be since #384 was merged. And we can call AndroidAlarmManager.getScheduledAlarms()
Actually that PR by me was reverted because that was stretching the functionality of the plugin beyond its ambit. So this issue can be closed.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days
To be honest, I would like this method to be present in this plugin. Getting pending alarms so I can cancel some or all of them (a separate call to cancel all alarms at once?) would be nice for my use case.
I work on an app that schedules multiple alarms at a particular action of the user to remind them to do another task later. If the user does that task before the due time, then I don't need those alarms anymore. Right now as a workaround, I am recording the IDs of each of the alarms I am scheduling and later if not needed anymore, cancelling them by iteration. This method isn't exactly reliable for me as sometimes I get alarms firing even though I have cancelled them. Maybe I am getting the ID wrong but a method to cancel all or view pending ones to cancel some of them would be great considering that it has already been done before.