Is it possible to query the Android AlarmManager for the time of the next alarm for a given PendingIntent? I know I can cancel one using the .cancel(PendingIntent) function, and I can update one using .set(), but is it possible to "query" one? I use something like this to see if one is already scheduled:
PendingIntent sender = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_NO_CREATE);
If sender == null, then one is already scheduled. I'd really like to know "for what time?" if possible.
I know I could save this in a database or other location, when I set it, but I'd really like query "the official source" to be sure. Possible?
Is it possible to query the Android AlarmManager for the time of the next alarm for a given PendingIntent?
Unfortunately, no. 'AlarmManager' is a write-only interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With