Added in API level 26

RemoteAction


class RemoteAction : Parcelable
kotlin.Any
   ↳ android.app.RemoteAction

Represents a remote action that can be called from another process. The action can have an associated visualization including metadata like an icon or title.

Summary

Inherited constants
Public constructors
RemoteAction(icon: Icon, title: CharSequence, contentDescription: CharSequence, intent: PendingIntent)

Public methods
RemoteAction!

Int

Unit
dump(prefix: String!, pw: PrintWriter!)

Boolean
equals(other: Any?)

PendingIntent

Return the action intent.

CharSequence

Return a content description representing the action.

Icon

Return an icon representing the action.

CharSequence

Return an title representing the action.

Int

Boolean

Return whether this action is enabled.

Unit
setEnabled(enabled: Boolean)

Sets whether this action is enabled.

Unit
setShouldShowIcon(shouldShowIcon: Boolean)

Sets whether the icon should be shown.

Boolean

Return whether the icon should be shown.

Unit
writeToParcel(out: Parcel, flags: Int)

Properties
static Parcelable.Creator<RemoteAction!>

Public constructors

RemoteAction

Added in API level 26
RemoteAction(
    icon: Icon,
    title: CharSequence,
    contentDescription: CharSequence,
    intent: PendingIntent)
Parameters
icon Icon: This value cannot be null.
title CharSequence: This value cannot be null.
contentDescription CharSequence: This value cannot be null.
intent PendingIntent: This value cannot be null.

Public methods

clone

Added in API level 26
fun clone(): RemoteAction!
Return
RemoteAction! 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

Added in API level 26
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

dump

Added in API level 26
fun dump(
    prefix: String!,
    pw: PrintWriter!
): Unit

equals

Added in API level 26
fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getActionIntent

Added in API level 26
fun getActionIntent(): PendingIntent

Return the action intent.

Return
PendingIntent This value cannot be null.

getContentDescription

Added in API level 26
fun getContentDescription(): CharSequence

Return a content description representing the action.

Return
CharSequence This value cannot be null.

getIcon

Added in API level 26
fun getIcon(): Icon

Return an icon representing the action.

Return
Icon This value cannot be null.

getTitle

Added in API level 26
fun getTitle(): CharSequence

Return an title representing the action.

Return
CharSequence This value cannot be null.

hashCode

Added in API level 26
fun hashCode(): Int
Return
Int a hash code value for this object.

isEnabled

Added in API level 26
fun isEnabled(): Boolean

Return whether this action is enabled.

setEnabled

Added in API level 26
fun setEnabled(enabled: Boolean): Unit

Sets whether this action is enabled.

setShouldShowIcon

Added in API level 28
fun setShouldShowIcon(shouldShowIcon: Boolean): Unit

Sets whether the icon should be shown.

shouldShowIcon

Added in API level 28
fun shouldShowIcon(): Boolean

Return whether the icon should be shown.

writeToParcel

Added in API level 26
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

Properties

CREATOR

Added in API level 26
static val CREATOR: Parcelable.Creator<RemoteAction!>