我想在两个日期之间设置闹钟。
例如date1 = 02/12/2105
和date2 = 21/12/2015
警报应该在date1和date2之间每天触发
我尝试过使用下面的代码
private void setAlarm(Calendar targetCal){
Intent intent = new Intent(getBaseContext(), AlarmReceiver.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(getBaseContext(), RQS_1, intent, 0);
AlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, targetCal.getTime(), AlarmManager.INTERVAL_DAY, pendingIntent);
}