d-Rickyy-b/MGGVertretungsplan

Notifications (AlarmManager) on Android 8 not working

d-Rickyy-b opened this issue · 3 comments

As one of the changes that Android 8.0 (API level 26) introduces to improve battery life, when your app enters the cached state, with no active components, the system releases any wakelocks that the app holds.

Source: https://developer.android.com/about/versions/oreo/android-8.0-changes.html

I am not 100% sure how to fix this. I could temporarily fix it by not targetting Android 8.

By default, these restrictions only apply to apps that target O. However, users can enable these restrictions for any app from the Settings screen, even if the app has not targetted O

But this would be stupid and no long term solution.

Also see https://blog.klinkerapps.com/android-o-background-services/

This was worked around temporarily by using Android 7 as Target SDK

Also check #85

Implemented in 48631f8