简体   繁体   中英

AlarmManger setExact invoke past time alarm

I read the developers guide about AlarmManager, but it dont speciffy the case when a setExact is set on past time.

In that case will the alram trigger (similler to set method)?

Well, i was running on the same question. Now I tried

long timeout=0;
am.setExact(AlarmManager.RTC_WAKEUP, timeout, pendIntent);

and it fired instantly, so I guess the answer is YES. :)

LogCat: 06-13 13:24:42.997: V/LocationService(9729): setAlarm for Task lunch at Thu Jan 01 01:00:00 MEZ 1970

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM