简体   繁体   中英

Android: how to run a thread in service after the device has been rebooted

How to run a thread in background, after the device is rebooted. I'm trying to re schedule the alarm using alarm manager after the device is rebooted. But miserably it is ringing once after reboot and the scheduled alarms are cleared after reboot. so i've to make a thread run in background service that re-schedules the alarm taking the time from the database. How to achieve it? any help is highly appreciated and thanks in advance...

您可以通过为ACTION_BOOT_COMPLETED设置BroadcastReceiver来监听重启事件

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