RemoteActionCompat

class RemoteActionCompat
kotlin.Any
   ↳ androidx.core.app.RemoteActionCompat

Helper for accessing features in android.app.RemoteAction.

Summary

Public constructors
<init>(icon: IconCompat, title: CharSequence, contentDescription: CharSequence, intent: PendingIntent)

Constructs a Foo builder using data from other.

Public methods
IconCompat

Return an icon representing the action.

Unit
setShouldShowIcon(shouldShowIcon: Boolean)

Sets whether the icon should be shown.

RemoteAction

Convert this compat object to RemoteAction object.

Bundle!

Adds this Icon to a Bundle that can be read back with the same parameters to #createFromBundle(Bundle).

CharSequence

Return a content description representing the action.

PendingIntent

Return the action intent.

Boolean

Return whether the icon should be shown.

Boolean

Return whether this action is enabled.

Unit
setEnabled(enabled: Boolean)

Sets whether this action is enabled.

CharSequence

Return an title representing the action.

static RemoteActionCompat

Creates an RemoteActionCompat from a RemoteAction.

static RemoteActionCompat?

Extracts an icon from a bundle that was added using #toBundle().

Public constructors

<init>

RemoteActionCompat(icon: IconCompat, title: CharSequence, contentDescription: CharSequence, intent: PendingIntent)

<init>

RemoteActionCompat(other: RemoteActionCompat)

Constructs a Foo builder using data from other.

Public methods

getIcon

fun getIcon(): IconCompat

Return an icon representing the action.

setShouldShowIcon

fun setShouldShowIcon(shouldShowIcon: Boolean): Unit

Sets whether the icon should be shown.

toRemoteAction

fun toRemoteAction(): RemoteAction

Convert this compat object to RemoteAction object.

Return
RemoteAction: RemoteAction object

toBundle

fun toBundle(): Bundle!

Adds this Icon to a Bundle that can be read back with the same parameters to #createFromBundle(Bundle).

getContentDescription

fun getContentDescription(): CharSequence

Return a content description representing the action.

getActionIntent

fun getActionIntent(): PendingIntent

Return the action intent.

shouldShowIcon

fun shouldShowIcon(): Boolean

Return whether the icon should be shown.

isEnabled

fun isEnabled(): Boolean

Return whether this action is enabled.

setEnabled

fun setEnabled(enabled: Boolean): Unit

Sets whether this action is enabled.

getTitle

fun getTitle(): CharSequence

Return an title representing the action.

createFromRemoteAction

static fun createFromRemoteAction(remoteAction: RemoteAction): RemoteActionCompat

Creates an RemoteActionCompat from a RemoteAction.

createFromBundle

static fun createFromBundle(bundle: Bundle): RemoteActionCompat?

Extracts an icon from a bundle that was added using #toBundle().