You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now my issue is when I disconnect and close the mqtt connection still notification not removed from the status bar. Please suggest how can I remove that notification after mqtt disconnection.
I have used
val notificationManager = NotificationManagerCompat.from(context)
notificationManager.cancel(notificationId)
and
val notificationManager =
MyApp.appContext.
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.cancel(notificationId)
this as well on mqtt disconnect, but still notification is not removing.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
I have attached a notification when starting the service like below
mqttClient!!.setForegroundService(notification.build(), notificationId)
Now my issue is when I disconnect and close the mqtt connection still notification not removed from the status bar. Please suggest how can I remove that notification after mqtt disconnection.
I have used
val notificationManager = NotificationManagerCompat.from(context)
notificationManager.cancel(notificationId)
and
val notificationManager =
MyApp.appContext.
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.cancel(notificationId)
The text was updated successfully, but these errors were encountered: