How to set an alarm to exact hour on following days?

63 Views Asked by At

I'm trying to make an alarm that besides shoot today, repeat on the exact same hour on the next day.

Not having any success until now.

 Calendar calendar = Calendar.getInstance();
 calendar.set(Calendar.HOUR_OF_DAY, timeHOUR);
 calendar.set(Calendar.HOUR, timeHOUR);
 calendar.set(Calendar.MINUTE, timeMINUTE);

The alarm must occur at the same times on the following days.

        alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP,
        calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);

Also i need to be able to register more than 1 alarm. I'm not sure if setRepeating() supports that.

0

There are 0 best solutions below