StatusBarNotification
open class StatusBarNotification : Parcelable
kotlin.Any | |
↳ | android.service.notification.StatusBarNotification |
Class encapsulating a Notification. Sent by the NotificationManagerService to clients including the status bar and any android.service.notification.NotificationListenerService
s.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
StatusBarNotification(pkg: String!, opPkg: String!, id: Int, tag: String!, uid: Int, initialPid: Int, score: Int, notification: Notification!, user: UserHandle!, postTime: Long) |
|
StatusBarNotification(in: Parcel!) |
Public methods | |
---|---|
open StatusBarNotification! |
clone() |
open Int | |
open String! |
A key that indicates the group with which this message ranks. |
open Int |
getId() The id supplied to |
open String! |
getKey() A unique instance key for this notification record. |
open Notification! |
The |
open String |
getOpPkg() The package that posted the notification. |
open String! |
Returns the override group key. |
open String! |
The package that the notification belongs to. |
open Long |
The time (in |
open String! |
getTag() The tag supplied to |
open Int |
getUid() The notifying app's ( |
open UserHandle! |
getUser() The |
open Int |
Returns a userid for whom this notification is intended. |
open Boolean |
Returns true if application asked that this notification be part of a group. |
open Boolean |
Convenience method to check the notification's flags for either |
open Boolean |
isGroup() Returns true if this notification is part of a group. |
open Boolean |
Convenience method to check the notification's flags for |
open Unit |
setOverrideGroupKey(overrideGroupKey: String!) Sets the override group key. |
open String |
toString() |
open Unit |
writeToParcel(out: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<StatusBarNotification!> |
Public constructors
StatusBarNotification
StatusBarNotification(
pkg: String!,
opPkg: String!,
id: Int,
tag: String!,
uid: Int,
initialPid: Int,
score: Int,
notification: Notification!,
user: UserHandle!,
postTime: Long)
Deprecated: Non-system apps should not need to create StatusBarNotifications.
Public methods
clone
open fun clone(): StatusBarNotification!
Return | |
---|---|
StatusBarNotification! |
a clone of this instance. |
Exceptions | |
---|---|
java.lang.CloneNotSupportedException |
if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned. |
describeContents
open fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getGroupKey
open fun getGroupKey(): String!
A key that indicates the group with which this message ranks.
getId
open fun getId(): Int
The id supplied to android.app.NotificationManager#notify(int, Notification)
.
getKey
open fun getKey(): String!
A unique instance key for this notification record.
getNotification
open fun getNotification(): Notification!
The android.app.Notification
supplied to android.app.NotificationManager#notify(int, Notification)
.
getOpPkg
open fun getOpPkg(): String
The package that posted the notification.
Might be different from getPackageName()
if the app owning the notification has a notification delegate
.
Return | |
---|---|
String |
This value cannot be null . |
getOverrideGroupKey
open fun getOverrideGroupKey(): String!
Returns the override group key.
getPackageName
open fun getPackageName(): String!
The package that the notification belongs to.
getPostTime
open fun getPostTime(): Long
The time (in System#currentTimeMillis
time) the notification was posted, which may be different than android.app.Notification#when
.
getTag
open fun getTag(): String!
The tag supplied to android.app.NotificationManager#notify(int, Notification)
, or null if no tag was specified.
getUser
open fun getUser(): UserHandle!
The android.os.UserHandle
for whom this notification is intended.
getUserId
open fungetUserId(): Int
Deprecated: Use getUser()
instead.
Returns a userid for whom this notification is intended.
isAppGroup
open fun isAppGroup(): Boolean
Returns true if application asked that this notification be part of a group.
isClearable
open fun isClearable(): Boolean
Convenience method to check the notification's flags for either Notification#FLAG_ONGOING_EVENT
or Notification#FLAG_NO_CLEAR
.
isGroup
open fun isGroup(): Boolean
Returns true if this notification is part of a group.
isOngoing
open fun isOngoing(): Boolean
Convenience method to check the notification's flags for Notification#FLAG_ONGOING_EVENT
.
setOverrideGroupKey
open fun setOverrideGroupKey(overrideGroupKey: String!): Unit
Sets the override group key.
toString
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
open fun writeToParcel(
out: Parcel,
flags: Int
): Unit
Parameters | |
---|---|
dest |
The Parcel in which the object should be written. This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |