How to schedule notifications using WorkManager?

前端 未结 4 1113
一个人的身影
一个人的身影 2020-11-29 08:24

I want to schedule a notification everytime the user add a note in the database for a specific time. While there are multiple ways to do it using AlarmManager, BroadcastRece

4条回答
  •  一整个雨季
    2020-11-29 09:28

    WorkManager isn't appropriate for work that needs to happen at a particular time.

    You should use AlarmManager, and specifically AlarmManagerCompat.setExactAndAllowWhileIdle(), to get a callback at a specific time.

提交回复
热议问题