/*
- * Copyright © 2021-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
// Set the color.
notificationBuilder.setColor(getColor(R.color.red_notification_icon))
+ // Prevent swiping to dismiss the notification.
+ notificationBuilder.setOngoing(true)
+
// Start the foreground notification.
startForeground(NOTIFICATION_ID, notificationBuilder.build())
// Set the color.
antiquatedNetworkNotificationBuilder.setColor(getColor(R.color.red_notification_icon))
+ // Prevent swiping to dismiss the notification.
+ antiquatedNetworkNotificationBuilder.setOngoing(true)
+
// Update the notification.
notificationManager.notify(NOTIFICATION_ID, antiquatedNetworkNotificationBuilder.build())
// Set the color.
insecureNetworkNotificationBuilder.setColor(getColor(R.color.yellow_notification_icon))
+ // Prevent swiping to dismiss the notification.
+ insecureNetworkNotificationBuilder.setOngoing(true)
+
// Update the notification.
notificationManager.notify(NOTIFICATION_ID, insecureNetworkNotificationBuilder.build())
// Set the color.
secureNetworkNotificationBuilder.setColor(getColor(R.color.blue_icon))
+ // Prevent swiping to dismiss the notification.
+ secureNetworkNotificationBuilder.setOngoing(true)
+
// Update the notification.
notificationManager.notify(NOTIFICATION_ID, secureNetworkNotificationBuilder.build())
}
}
}
-}
\ No newline at end of file
+}