Reputation: 15509
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
long schedualed = getNextSchedualTime(context);
alarmManager.set(AlarmManager.RTC, schedualed, makeControlPendingIntent(context));
I know to set RTC_WAKEUP
would run even if phone is sleep. But I want to know when the phone is asleep, would the RTC
alarm which should be triggered in the sleeping time be delayed to when the phone wake up?
Upvotes: 1
Views: 732
Reputation: 74790
From official documentation here:
Alarm time in
System.currentTimeMillis()
(wall clock time in UTC). This alarm does not wake the device up; if it goes off while the device is asleep, it will not be delivered until the next time the device wakes up.
So answer to your question: yes, it will be delayed and will not be dropped.
Upvotes: 3