public
static
class
NotificationListenerService.Ranking
extends Object
java.lang.Object | |
↳ | android.service.notification.NotificationListenerService.Ranking |
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
.
Public constructors | |
---|---|
NotificationListenerService.Ranking()
|
Public methods | |
---|---|
int
|
getImportance()
Returns the importance of the notification, which dictates its
modes of presentation, see: |
CharSequence
|
getImportanceExplanation()
If the importance has been overriden by user preference, then this will be non-null, and should be displayed to the user. |
String
|
getKey()
Returns the key of the notification this Ranking applies to. |
String
|
getOverrideGroupKey()
If the system has overriden the group key, then this will be non-null, and this key should be used to bundle notifications. |
int
|
getRank()
Returns the rank of the notification. |
int
|
getSuppressedVisualEffects()
Returns the type(s) of visual effects that should be suppressed for this 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. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
int getImportance ()
Returns the importance of the notification, which dictates its
modes of presentation, see: IMPORTANCE_DEFAULT
, etc.
Returns | |
---|---|
int |
the rank of the notification |
CharSequence getImportanceExplanation ()
If the importance has been overriden by user preference, then this will be non-null, and should be displayed to the user.
Returns | |
---|---|
CharSequence |
the explanation for the importance, or null if it is the natural importance |
String getKey ()
Returns the key of the notification this Ranking applies to.
Returns | |
---|---|
String |
String getOverrideGroupKey ()
If the system has overriden the group key, then this will be non-null, and this key should be used to bundle notifications.
Returns | |
---|---|
String |
int getRank ()
Returns the rank of the notification.
Returns | |
---|---|
int |
the rank of the notification, that is the 0-based index in the list of active notifications. |
int getSuppressedVisualEffects ()
Returns the type(s) of visual effects that should be suppressed for this notification.
See SUPPRESSED_EFFECT_SCREEN_OFF
, SUPPRESSED_EFFECT_SCREEN_ON
.
Returns | |
---|---|
int |
boolean isAmbient ()
Returns whether the notification is an ambient notification, that is a notification that doesn't require the user's immediate attention.
Returns | |
---|---|
boolean |
boolean matchesInterruptionFilter ()
Returns whether the notification matches the user's interruption filter.
Returns | |
---|---|
boolean |
true if the notification is allowed by the filter, or
false if it is blocked.
|