Skip to content
Snippets Groups Projects
Unverified Commit bf26eb4e authored by Johannes Münichsdorfer's avatar Johannes Münichsdorfer Committed by GitHub
Browse files

Updated NotificationHelper to use highest notification priority (PRIORITY_MAX) (#203)


We should ensure that notifications always have the highest priority also on older devices.

Co-authored-by: default avatarJohannes Münichsdorfer <johannes.muenichsdorfer@tum.de>
Co-authored-by: default avatarJakob Möller <jakob.moeller@sap.com>
Co-authored-by: default avatarHee Tatt Ooi <hee.tatt.ooi@sap.com>
parent bb21c628
No related branches found
No related tags found
No related merge requests found
...@@ -92,7 +92,7 @@ object NotificationHelper { ...@@ -92,7 +92,7 @@ object NotificationHelper {
private fun buildNotification(title: String, content: String, visibility: Int): Notification? { private fun buildNotification(title: String, content: String, visibility: Int): Notification? {
val builder = NotificationCompat.Builder(CoronaWarnApplication.getAppContext(), channelId) val builder = NotificationCompat.Builder(CoronaWarnApplication.getAppContext(), channelId)
.setSmallIcon(NotificationConstants.NOTIFICATION_SMALL_ICON) .setSmallIcon(NotificationConstants.NOTIFICATION_SMALL_ICON)
.setPriority(NotificationCompat.PRIORITY_HIGH) .setPriority(NotificationCompat.PRIORITY_MAX)
.setVisibility(visibility) .setVisibility(visibility)
.setContentIntent(createPendingIntentToMainActivity()) .setContentIntent(createPendingIntentToMainActivity())
.setAutoCancel(true) .setAutoCancel(true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment