SilenceReceiver silenceReceiver = new SilenceReceiver();
IntentFilter silenceFilter = new IntentFilter(SilenceReceiver.SILENCE_ALARM);
registerReceiver(silenceReceiver, silenceFilter);
AwakeReceiver awakeReceiver = new AwakeReceiver();
IntentFilter awakeFilter = new IntentFilter(AwakeReceiver.WAKE_ALARM);
registerReceiver(awakeReceiver, awakeFilter);
GregorianCalendar sleepCalendar = new GregorianCalendar();
sleepCalendar.set(Calendar.SECOND, sleepCalendar.get(Calendar.SECOND)+5);
long triggerTime = sleepCalendar.getTimeInMillis();
GregorianCalendar awakeCalendar = new GregorianCalendar();
awakeCalendar.set(Calendar.SECOND, awakeCalendar.get(Calendar.SECOND)+30);
long awakeTime = awakeCalendar.getTimeInMillis();
AlarmManager alarm = (AlarmManager) this.getSystemService(Service.ALARM_SERVICE);
PendingIntent sleepIntent = PendingIntent.getBroadcast(this, 0, new Intent(SilenceReceiver.SILENCE_ALARM), 0);
alarm.set(AlarmManager.RTC_WAKEUP, triggerTime, sleepIntent);
PendingIntent awakeIntent = PendingIntent.getBroadcast(this, 0, new Intent(AwakeReceiver.WAKE_ALARM), 0);
alarm.set(AlarmManager.RTC_WAKEUP, awakeTime, awakeIntent);
Проблема в том, что если задача убита, мой AwakeReceiver никогда не получает триггер.Что я могу с этим поделать?