Android APIs
public static class

NotificationListenerService.RankingMap

extends Object
implements Parcelable
java.lang.Object
   ↳ android.service.notification.NotificationListenerService.RankingMap

Class Overview

Provides access to ranking information on currently active notifications.

Note that this object represents a ranking snapshot that only applies to notifications active at the time of retrieval.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<NotificationListenerService.RankingMap> CREATOR
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
String[] getOrderedKeys()
Request the list of notification keys in their current ranking order.
boolean getRanking(String key, NotificationListenerService.Ranking outRanking)
Populates outRanking with ranking information for the notification with the given key.
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<NotificationListenerService.RankingMap> CREATOR

Added in API level 21

Public Methods

public int describeContents ()

Added in API level 21

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public String[] getOrderedKeys ()

Added in API level 21

Request the list of notification keys in their current ranking order.

Returns
  • An array of active notification keys, in their ranking order.

public boolean getRanking (String key, NotificationListenerService.Ranking outRanking)

Added in API level 21

Populates outRanking with ranking information for the notification with the given key.

Returns
  • true if a valid key has been passed and outRanking has been populated; false otherwise

public void writeToParcel (Parcel dest, int flags)

Added in API level 21

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.