Open himanshu-my opened 2 years ago
When you do this
mqttClient!!.setForegroundService(notification.build(), notificationId)
you can remove it with this
val notificationManager = NotificationManagerCompat.from(context)
notificationManager.cancel(notificationId)
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, but still notification is not removing.
Please Reopen this issue , this issue is still occurring and also provide the exact solution for it
and also provide the exact solution for it
This repo comes with a contribution model. I'm not the only one who can contribute
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!
Sorry for the late response. Please use https://github.com/hannesa2/paho.mqtt.android/releases/tag/3.6.0-beta7 and please tell me, how it works after several connect/disconnect. I didn't tested this.
i tested it not working properly and application crash
i tested it not working properly and application crash
Please show me the crash. I guess a crash would be found by CI, but maybe I'm wrong
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.