cbeyls / fosdem-companion-android

FOSDEM Companion for Android
Apache License 2.0
136 stars 93 forks source link

Refactor AppAlarmManager #75

Closed cbeyls closed 2 years ago

cbeyls commented 2 years ago

Remove AlarmIntentService (which was based on deprecated JobIntentService) and use use simple coroutines queued using a Mutex instead. The execution time is so quick that there is no need to create expedited Jobs for the alarm scheduling tasks. Use BroadcastReceiver.goAsync() to build the notification asynchronously from a coroutine without the need to launch a Service or acquiring a special wake lock.