fix: Clear notifications on device switch (#2281)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-06-28 14:50:05 +00:00 committed by GitHub
parent 9cde2f1b1a
commit 7e6bf21e2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View file

@ -61,6 +61,10 @@ class MeshServiceNotifications(
// We have two notification channels: one for general service status and another one for messages
val notifyId = 101
fun clearNotifications() {
notificationManager.cancelAll()
}
fun initChannels() {
// create notification channels on service creation
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {