设置从已经过的时间开始的重复警报。现在发生了什么?

时间:2014-06-17 03:09:31

标签: android alarmmanager

alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
                startingTime, App.SYNC_DATA_FREQUENCY,
                dataSyncServicePendingIntent);

如果startingTime已经过去会发生什么。当它应该被解雇时,警报是否会触发前一次?

1 个答案:

答案 0 :(得分:1)

警报将立即触发。

正如documentation所述:

 If the stated trigger time is in the past, the alarm will be triggered immediately, 
 with an alarm count depending on how far in the past the trigger time is relative to the repeat interval.