I'd like to schedule multiple repeated time-based alarms. According to this android dev doc, "Repeating alarms that are based on a precise trigger time don't scale well", why that is, i dont understand. But i need this precise type of functionality. So what are my options? My main goal is to schedule the alarms using the AlarmManager class, and when the scheduled time occurs, issue a notification, but considering the dev doc, im not too sure about how to go about it.
EDIT:
Iv managed to schedule my alarms, which arnt exactly repeated time-based alarms in the strictest sense of recurring repeatedly after a set time interval, but "repeating" in the sense of setting multiple alarms. Now when I set my date and time on the Calendar, the month gets set for a month ahead, if i put 10, it sets the month to 11, heres my code:
Calendar cal = Calendar.getInstance();
String date = "23/10/2016";//month set to 10
String[] _date = date.split("/");
String time = "4:33";
String[] _time = time.split(":");
Intent intent = new Intent(test.this,
AlarmReceiver.class);
intent.setData(Uri.parse("timer:555"));
PendingIntent sender = PendingIntent.getBroadcast(
test.this, 0, intent,
0);
cal.set(Integer.parseInt(_date[2]), //year
Integer.parseInt(_date[1]), //month
Integer.parseInt(_date[0]), //day
Integer.parseInt(_time[0]), //hour
Integer.parseInt(_time[1]));//minute
AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
am.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), sender);
Toast mToast = Toast.makeText(
test.this,
"Reminders added to the calendar successfully for "
+ android.text.format.DateFormat.format(
"MM/dd/yy h:mmaa",
cal.getTimeInMillis()),
Toast.LENGTH_LONG);
mToast.show();//month displayed is 11