Skip to content

Notification is not removing when we set setForegroundService in mqtt client  #4

Description

@Monika-Paliwal

We have added the notification in mqtt for show the notification in notification bar but when we logout the app the notification bar still showing.
We have used below mentioned code.
mqttClient!!.setForegroundService(notification.build(), notificationId)
And also used code for cancel notification
val notificationManager = context getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager notificationManager.cancel(notificationId)

Can you please provide the solution for stop the foreground service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions