Android APIs
public static class

NotificationListenerService.Ranking

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

Class Overview

Stores ranking related information on a currently active notification.

Ranking objects aren't automatically updated as notification events occur. Instead, ranking information has to be retrieved again via the current NotificationListenerService.RankingMap.

Summary

Public Constructors
NotificationListenerService.Ranking()
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 matchesInterruptionFilter()
Returns whether the notification matches the user's interruption filter.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public NotificationListenerService.Ranking ()

Added in API level 21

Public Methods

public String getKey ()

Added in API level 21

Returns the key of the notification this Ranking applies to.

public int getRank ()

Added in API level 21

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 ()

Added in API level 21

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

public boolean matchesInterruptionFilter ()

Added in API level 21

Returns whether the notification matches the user's interruption filter.

Returns
  • true if the notification is allowed by the filter, or false if it is blocked.