private static String getNotificationID ( ) { NotificationManager . ID_COUNTER = NotificationManager . ID_COUNTER + 1 ; logger . fine ( "Notifications identifier counter: " + ID_COUNTER ) ; return "Notification#" + ( NotificationManager . ID_COUNTER ) ; }
Each new notification needs a notification - ID . NotificationManager monitors the number of notifications and generates a unique identifier for each of them using this method to obtain it .