Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to check if notification is showing in android

NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
StatusBarNotification[] notifications = mNotificationManager.getActiveNotifications();
for (StatusBarNotification notification : notifications) {
  if (notification.getId() == 100) {
    // Do something.
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #notification #showing #android
ADD COMMENT
Topic
Name
1+7 =