Android: How to create an “Ongoing” notification?

In case you are using NotificationCompat.Builder , you can use :

NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
mBuilder.setOngoing(true); //this will make ongoing notification

Leave a Comment