Sdílet prostřednictvím


NotificationListenerService.Ranking Class

Definition

Stores ranking related information on a currently active notification.

[Android.Runtime.Register("android/service/notification/NotificationListenerService$Ranking", DoNotGenerateAcw=true)]
public class NotificationListenerService.Ranking : Java.Lang.Object
[<Android.Runtime.Register("android/service/notification/NotificationListenerService$Ranking", DoNotGenerateAcw=true)>]
type NotificationListenerService.Ranking = class
    inherit Object
Inheritance
NotificationListenerService.Ranking
Attributes

Remarks

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 RankingMap.

Java documentation for android.service.notification.NotificationListenerService.Ranking.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

NotificationListenerService.Ranking()
NotificationListenerService.Ranking(IntPtr, JniHandleOwnership)

Fields

UserSentimentNegative
Obsolete.

The user is likely to have a negative reaction to this notification.

UserSentimentNeutral
Obsolete.

It is not known how the user will react to this notification.

UserSentimentPositive
Obsolete.

The user is likely to have a positive reaction to this notification.

VisibilityNoOverride

Value signifying that the user and device policy manager have not expressed a lockscreen visibility override for a notification.

Properties

Channel

Returns the notification channel this notification was posted to, which dictates notification behavior and presentation.

Class

Returns the runtime class of this Object.

(Inherited from Object)
ConversationShortcutInfo

Returns the shortcut information associated with this notification, if it is a #isConversation() conversation notification.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
ImportanceExplanation
ImportanceExplanationFormatted

If the importance has been overridden by user preference, then this will be non-null, and should be displayed to the user.

IsAmbient

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

IsConversation

Returns whether this notification is a conversation notification, and would appear in the conversation section of the notification shade, on devices that separate that type of notification.

IsSuspended

Returns whether the app that posted this notification is suspended, so this notification should be hidden.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Key

Returns the key of the notification this Ranking applies to.

LastAudiblyAlertedMillis

Returns the last time this notification alerted the user via sound or vibration.

LockscreenVisibilityOverride

Returns the user or device policy manager specified visibility (see Notification#VISIBILITY_PRIVATE, Notification#VISIBILITY_PUBLIC, Notification#VISIBILITY_SECRET) for this notification, or NotificationListenerService.Ranking#VISIBILITY_NO_OVERRIDE if no such preference has been expressed.

OverrideGroupKey

If the system has overridden the group key, then this will be non-null, and this key should be used to bundle notifications.

PeerReference (Inherited from Object)
Rank

Returns the rank of the notification.

SmartActions

Returns a list of smart Notification.Action that can be added by the NotificationAssistantService

SmartReplies

Returns a list of smart replies that can be added by the NotificationAssistantService

SuppressedVisualEffects

Returns the type(s) of visual effects that should be suppressed for this notification.

ThresholdClass
ThresholdType
UserSentiment

Returns how the system thinks the user feels about notifications from the channel provided by #getChannel().

Methods

CanBubble()

Returns whether the user has allowed bubbles globally, at the app level, and at the channel level for this notification.

CanShowBadge()

Returns whether this notification can be displayed as a badge.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
MatchesInterruptionFilter()

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

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to