Я установил будильник, чтобы он напомнил мне, что он работает, когда устройство включено.Но когда я выключаю устройство и снова включаю напоминание, будильник не работает.Ребята, подскажите, пожалуйста, как можно решить эту проблему?
Мой код выглядит так:
Intent myIntent = new Intent(getApplicationContext(), serviceclass.class);
PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(),
CONST+id, myIntent, PendingIntent.FLAG_UPDATE_CURRENT);
Calendar calender = Calendar.getInstance();
calender.setTimeInMillis(System.currentTimeMillis());
calender.set(Calendar.HOUR_OF_DAY, hours);
calender.set(Calendar.MINUTE, ireminder.getMin());
calender.set(Calendar.SECOND, 0);
calender.set(Calendar.MILLISECOND, 0);
calender.set(Calendar.DAY_OF_WEEK, day);
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
calender.getTimeInMillis(), 7 * AlarmManager.INTERVAL_DAY, pendingIntent);