알람 매니저 관련 질문합니다.
Intent intent = new Intent(AlarmTest.this, AlarmedTimeShow.class);
intent.putExtra("time", hh+":"+mm);
intent.putExtra("data", "알람: " + currentCalendar.getTime().toLocaleString());
Toast.makeText(mContext, "reqCode : "+reqCode, 0).show();
PendingIntent[] pendingIntent = new PendingIntent[5];
for (int j = 0; j < pendingIntent.length; j++) {
//0, 1, 2, 3, 4
pendingIntent[j] = PendingIntent.getActivity(AlarmTest.this, j, intent, PendingIntent.FLAG_UPDATE_CURRENT);
intent.putExtra("reqCode", j);
Log.d("reqCode", "reqCode is... " + j);
}
for (int j = 0; j <= 4; j++) {
alarmManager.set(AlarmManager.RTC_WAKEUP, gregorianCalendar.getTimeInMillis() + (1000 * j), pendingIntent[j]);//0
System.out.println("for문을 이용한 알람 등록 완료!");
}
이런식으로 알람을 등록한 후에 AlarmedTimedShow 클래스에서 액티비티가 실행되게 해놓았습니다.
부팅 시에 알람이 초기화되는데요. 이같은 경우 어떻게 해야할까요?