androidnotificationsandroid-notificationsdismiss

Prevent user from dismissing notification


Some apps have notifications which can´t be dismissed by swiping them away.

How can I manage such behaviour?


Solution

  • In addition to Andro Selvas answer:

    If you are using the NotificationCompat.Builder, just use

    builder.setOngoing(true);