Replies: 2 comments 11 replies
-
Periodic task are subject to Android battery saving policies, you may not get accurate reminders with work manager. You can overcome the issue by scheduling a task with alarm manger. This is how the alarm clock is implemented. However, battery performance will suffer and it's typically not best practice. If you stick to work manger you can implement a callback which keeps track of the last reminder and will issue the notification once enough time has passed and block earlier invocations. Alarm manager: https:/abertschi/syncopoli/blob/feature/sync/app/src/main/java/org/amoradi/syncopoli/ScheduleManager.java#L55 |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your suggestions and resources. |
Beta Was this translation helpful? Give feedback.
-
I was trying to make a water reminder app. Currently, I am a little stuck on a feature where the user will be able to set a periodic reminder after every x (i.e 15 minutes) times except their selected sleeping time. The problem is when I was using a work manager for scheduling that reminder job it's firing reminder events at various time duration (i.e: after 30 minutes).
Did you ever experience something like that? Or any suggestions on how can I overcome this issue.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions