public static class NotificationListenerService.Ranking
extends Object
| java.lang.Object | |
| android.service.notification.NotificationListenerService.Ranking | |
存储当前活动通知的排名相关信息。
排名对象不会在发生通知事件时自动更新。 相反,排名信息必须通过当前的NotificationListenerService.RankingMap再次检索。
Public constructors |
|
|---|---|
NotificationListenerService.Ranking() |
|
公共方法(Public methods) |
|
|---|---|
int |
getImportance() 返回通知的重要性,该通知决定了其呈现方式,请参阅: |
CharSequence |
getImportanceExplanation() 如果重要性已被用户首选项覆盖,则这将是非空的,并应显示给用户。 |
String |
getKey() 返回此排名适用的通知的关键字。 |
String |
getOverrideGroupKey() 如果系统覆盖了组密钥,那么这将是非空的,并且此密钥应该用于捆绑通知。 |
int |
getRank() 返回通知的排名。 |
int |
getSuppressedVisualEffects() 返回应该为此通知取消的视觉效果的类型。 |
boolean |
isAmbient() 返回通知是否为环境通知,即不需要用户立即关注的通知。 |
boolean |
matchesInterruptionFilter() 返回通知是否与用户的中断过滤器匹配。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
int getImportance ()
返回通知的重要性,该通知决定了其呈现方式,请参阅: IMPORTANCE_DEFAULT等
| 返回(Returns) | |
|---|---|
int |
the rank of the notification |
CharSequence getImportanceExplanation ()
如果重要性已被用户首选项覆盖,则这将是非空的,并应显示给用户。
| 返回(Returns) | |
|---|---|
CharSequence |
the explanation for the importance, or null if it is the natural importance |
String getOverrideGroupKey ()
如果系统覆盖了组密钥,那么这将是非空的,并且此密钥应该用于捆绑通知。
| 返回(Returns) | |
|---|---|
String |
|
int getRank ()
返回通知的排名。
| 返回(Returns) | |
|---|---|
int |
the rank of the notification, that is the 0-based index in the list of active notifications. |
int getSuppressedVisualEffects ()
返回应该为此通知取消的视觉效果的类型。 见SUPPRESSED_EFFECT_SCREEN_OFF , SUPPRESSED_EFFECT_SCREEN_ON 。
| 返回(Returns) | |
|---|---|
int |
|
boolean matchesInterruptionFilter ()
返回通知是否与用户的中断过滤器匹配。
| 返回(Returns) | |
|---|---|
boolean |
true if the notification is allowed by the filter, or false if it is blocked. |