I am developing alarm application for that I need to invoke alarm repeatedly for the same time for all days. I am using the code to invoke the alarm,
c = Calendar.getInstance();
c.set(Calendar.HOUR_OF_DAY,10);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
Intent intent = new Intent(HomeActivity.this, MyAlarmService.class);
PendingIntent pendingIntent = PendingIntent.getService(HomeActivity.this, 123123, intent, 0);
alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, c.getTimeInMillis(), (24*60*60*1000), pendingIntent);
By using this code I am only invoking present day at 10AM, not for all days. Is there another way to do this?
Update time, and ring the alarm for every 5 minutes:
Set when the alarm works for everyday (for example, 8am-18pm)