我已经安排了闹钟,每天早上10点触发。如何在闹铃时间过去时避免触发闹铃?
我在上午12点周一设置此报警。
如果报警时间过去那么,报警将被立即触发。
但对于我的要求,我不希望立即触发。上午10点在第二天触发我很好。
下面是我当前的代码来设置报警:
Calendar activeModeTime = Calendar.getInstance();
// activeModeTime.setTimeZone(TimeZone.getTimeZone(Constants.TIME_ZONE));
activeModeTime.set(Calendar.HOUR_OF_DAY,
mSharedPrefManager.getActiveStartHourPref());
activeModeTime.set(Calendar.MINUTE,
Constants.DEFAULT_ACTIVE_START_MINUTE);
activeModeTime.set(Calendar.SECOND,
Constants.ALL_START_END_DEFAULT_SECOND);
mAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
activeModeTime.getTimeInMillis(), AlarmManager.INTERVAL_DAY,
getActiveModeAlarmPendingIntent());
我怎么做到这一点。
设置它后的第二天。 – 2015-04-06 10:42:59
我可以设置周二..但下周星期一我需要这个警报呐...如何做到这一点? – 2015-04-06 10:44:33
只需设置下一个日期。 – 2015-04-06 10:47:49