BetterUntis
BetterUntis copied to clipboard
[Bug Report] Notifications in breaks not showing up when automute is enabled
Description
When I enable automute and notifications, I just get the notification before the first lesson, not the ones in between lessons. My best guess would be that AlarmManager drops the scheduled notification when the unmute is scheduled, since "If there is already an alarm scheduled for the same IntentSender, that previous alarm will first be canceled." (from the reference on AlarmManager)
- Android version: 8.0.1
- BetterUntis version: 3.2.1
- Installation source: F-Droid
- Also confirmed in own build of 3.2.1-DEBUG
I just tested it with the current 3.2.2 version, as well as a 3.2.1 build and both settings work as intended (Android 10). The AlarmManager shouldn't drop the scheduled notification because the pending intent is different for notifications and automute.
I got the same problem with BetterUntis 3.2.2 on Android 8.1.0.
I'm not sure if the problem is related to automute. I think the problem has something to do with the notification before the first lesson. If I remember correctly, the notifications in the breaks appear if the notification before the first lesson is disabled.
I did some more testing, and the problem seems to be unrelated to automute, I'll have a look whether it has anything to do with the notification before the first lesson being active. According to logcat, NotificationSetup is fired, NotificationReceiver not
Do you use multiple profiles by any chance?
Actually I never got notifications to work and if they showed it said that loading the timetable failed.
Closing this as inactive. Feel free to open a new issue if you still have troubles with the latest version.