BridgedNotificationMetadata
class BridgedNotificationMetadata : Parcelable
| kotlin.Any | |
| ↳ | android.app.Notification.BridgedNotificationMetadata |
Encapsulates the information needed to display a notification as a bridged notification. A bridged notification is a notification sent from another device via a bridging application. The notification is displayed with customized content to differentiate it to the user from a local notification. Only preauthorized applications with bridging permissions can post bridged notifications.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
BridgedNotificationMetadata(originDeviceName: String, packageName: String, channelId: String, appIcon: Icon) |
|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Icon |
An icon representing the application the notification originated from. |
| String |
The channel ID for the notification on the origin device. |
| String |
The name of the device the notification originated from (e.g. "Jane's phone"). |
| String |
The package name of the application the notification originated from. |
| Unit |
writeToParcel(out: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<Notification.BridgedNotificationMetadata!> | |
Public constructors
BridgedNotificationMetadata
BridgedNotificationMetadata(
originDeviceName: String,
packageName: String,
channelId: String,
appIcon: Icon)
| Parameters | |
|---|---|
originDeviceName |
String: This value cannot be null. |
packageName |
String: This value cannot be null. |
channelId |
String: This value cannot be null. |
appIcon |
Icon: This value cannot be null. |
Public methods
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getAppIcon
fun getAppIcon(): Icon
An icon representing the application the notification originated from.
| Return | |
|---|---|
Icon |
This value cannot be null. |
getChannelId
fun getChannelId(): String
The channel ID for the notification on the origin device. Generally this should match the channel ID that the notification would have gone to on the local device if the app is installed in both places. This is used for blocking bridged notifications if the user has muted notifications for the applications channel on the local device.
| Return | |
|---|---|
String |
This value cannot be null. |
getOriginDeviceName
fun getOriginDeviceName(): String
The name of the device the notification originated from (e.g. "Jane's phone").
| Return | |
|---|---|
String |
This value cannot be null. |
getPackageName
fun getPackageName(): String
The package name of the application the notification originated from.
| Return | |
|---|---|
String |
This value cannot be null. |
writeToParcel
fun writeToParcel(
out: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| 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 the following:
|
out |
Parcel: This value cannot be null. |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<Notification.BridgedNotificationMetadata!>