Difference between AlarmManager and ScheduledExecutorService

前端 未结 3 998
情深已故
情深已故 2020-12-01 11:32

Besides setting and exact time (i.e. midnight) versus setting a delay (i.e. 24 hours), what\'s the difference between using AlarmManager and ScheduledExec

3条回答
  •  既然无缘
    2020-12-01 12:07

    I think ScheduledExecutorService is tied to your process and will not work in case your process gets killed. In contrast AlarmManager is managed by the OS so it works even if your application is not running.

提交回复
热议问题