Android APIs
public static class

NotificationListenerService.Ranking

extends Object
java.lang.Object
   ↳ android.service.notification.NotificationListenerService.Ranking

Class Overview

Provides access to ranking information on a currently active notification.

Note that this object is not updated on notification events (such as onNotificationPosted(StatusBarNotification, RankingMap), onNotificationRemoved(StatusBarNotification), etc.). Make sure to retrieve a new Ranking from the current NotificationListenerService.RankingMap whenever a notification event occurs.

Summary

Public Methods
String getKey()
Returns the key of the notification this Ranking applies to.
int getRank()
Returns the rank of the notification.
boolean isAmbient()
Returns whether the notification is an ambient notification, that is a notification that doesn't require the user's immediate attention.
boolean isInterceptedByDoNotDisturb()
Returns whether the notification was intercepted by "Do not disturb".
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public String getKey ()

Returns the key of the notification this Ranking applies to.

public int getRank ()

Returns the rank of the notification.

Returns
  • the rank of the notification, that is the 0-based index in the list of active notifications.

public boolean isAmbient ()

Returns whether the notification is an ambient notification, that is a notification that doesn't require the user's immediate attention.

public boolean isInterceptedByDoNotDisturb ()

Returns whether the notification was intercepted by "Do not disturb".