简体   繁体   中英

Android Background Task Scheduler

I want to schedule a task in Android that runs after every 15 minutes. The precision may vary at the most by +/- 30 sec, but not more than that. The methods Timer.schedule and ScheduledFuture.scheduleWithFixedDelay are not precise when the device is not awake. I need assurance that the task will always run every 15 min even when the device is in sleep mode. Please suggest all possible approaches.

使用AlarmManager 重复警报

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