I was looking at setRepeating(@AlarmType int type, long triggerAtMillis, long intervalMillis, PendingIntent operation)
method of AlarmManager and want to solve a use case.
Use case is I want to set repeating alarms with different intervalMillis
values. Like I want to show a notification after 2 hours, 5 hours and at 9AM the next day. Or I want to do something at every 1st date of month.
I have two solutions to this. Either I set all alarms at once or set the next alarm when previous alarm is received(in case no of alarms are more like with the second use case). Problem is if alarm is missed to be triggerred, I won't be able to trigger further alarms and the whole chain would break.
Is there anything provided by Android for this if I've missed it or else shouldn't Android provide such flexibility?