-
Notifications
You must be signed in to change notification settings - Fork 495
Updated NotificationHelper to use highest notification priority (PRIORITY_MAX) #203
Updated NotificationHelper to use highest notification priority (PRIORITY_MAX) #203
Conversation
…RITY_MAX) We should ensure that notifications always have the highest priority also on older devices.
To use the high priority, it is also needed to adjust this setting on the NotificationChannel on Devices >= API 26 (see here) |
Okey, didn't knew that. Thanks for pointing out! 👍 |
Sure :) Was also quite surprised seeing that "IMPORTANCE_MAX" is not used anymore. |
@jomapp thank you for your contribution this. As you already correctly noted, we are using PRIORITY_HIGH because PRIORITY_MAX is not in used. |
You're welcome but it's different from what you wrote. We should change it to PRIORITY_MAX. In the project we are currently using IMPORTANCE_HIGH, for the NotificationChannel, which is fine (since IMPORTANCE_MAX is unused.) But for the notification itself we should use PRIORITY_MAX instead of PRIORITY_HIGH since for older devices below API 26 this ensures that notifications are also shown with the highest priority. Infact: IMPORTANCE_HIGH (>= API 26) == PRIORITY_MAX (< API 26) |
@HeeTattSap Can we reopen this PR? I think it's relevant (please see my last comment) Thank you! |
@jomapp thank you. I misunderstood that this was about the channel. Your fix works and I have validated this on Android 6 and Android 10 devices. We will merge this change. Thank you again for your contribution :) |
@HeeTattSap thanks! No worries, thank you for merging it :) |
We should ensure that notifications always have the highest priority also on older devices.
Resolves #202
Checklist
Description