I want that the notification will be closed after the user is clicking on it. I saw that everybody saying to use flags, but I can\'t find the flags anywhere because I\'m usi
Here is notification:
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_calendar)
.setContentTitle("My Firebase Push notification")
.setContentText(message)
.setAutoCancel(true)
.setSound(soundUri)
.setContentIntent(pendingIntent);
the key behind cancellation on click is:
.setAutoCancel(true)
i hope it resolves the matter.