RemoteActionCompat
public
final
class
RemoteActionCompat
extends Object
| java.lang.Object | |
| ↳ | androidx.core.app.RemoteActionCompat |
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.
This is a backward-compatible version of RemoteAction.
Summary
Public constructors | |
|---|---|
RemoteActionCompat(IconCompat icon, CharSequence title, CharSequence contentDescription, PendingIntent intent)
|
|
RemoteActionCompat(RemoteActionCompat other)
Constructs a |
|
Public methods | |
|---|---|
static
RemoteActionCompat
|
createFromBundle(Bundle bundle)
Converts the bundle created by |
static
RemoteActionCompat
|
createFromRemoteAction(RemoteAction remoteAction)
Creates an RemoteActionCompat from a RemoteAction. |
PendingIntent
|
getActionIntent()
Return the action intent. |
CharSequence
|
getContentDescription()
Return a content description representing the action. |
IconCompat
|
getIcon()
Return an icon representing the action. |
CharSequence
|
getTitle()
Return an title representing the action. |
boolean
|
isEnabled()
Return whether this action is enabled. |
void
|
setEnabled(boolean enabled)
Sets whether this action is enabled. |
void
|
setShouldShowIcon(boolean shouldShowIcon)
Sets whether the icon should be shown. |
boolean
|
shouldShowIcon()
Return whether the icon should be shown. |
Bundle
|
toBundle()
Converts this into a Bundle that can be converted back to a |
RemoteAction
|
toRemoteAction()
Convert this compat object to |
Inherited methods | |
|---|---|
Public constructors
RemoteActionCompat
public RemoteActionCompat (IconCompat icon, CharSequence title, CharSequence contentDescription, PendingIntent intent)
| Parameters | |
|---|---|
icon |
IconCompat |
title |
CharSequence |
contentDescription |
CharSequence |
intent |
PendingIntent |
RemoteActionCompat
public RemoteActionCompat (RemoteActionCompat other)
Constructs a RemoteActionCompat using data from other.
| Parameters | |
|---|---|
other |
RemoteActionCompat |
Public methods
createFromBundle
public static RemoteActionCompat createFromBundle (Bundle bundle)
Converts the bundle created by toBundle() back to RemoteActionCompat.
| Parameters | |
|---|---|
bundle |
Bundle |
| Returns | |
|---|---|
RemoteActionCompat |
|
createFromRemoteAction
public static RemoteActionCompat createFromRemoteAction (RemoteAction remoteAction)
Creates an RemoteActionCompat from a RemoteAction.
| Parameters | |
|---|---|
remoteAction |
RemoteAction |
| Returns | |
|---|---|
RemoteActionCompat |
|
getActionIntent
public PendingIntent getActionIntent ()
Return the action intent.
| Returns | |
|---|---|
PendingIntent |
|
getContentDescription
public CharSequence getContentDescription ()
Return a content description representing the action.
| Returns | |
|---|---|
CharSequence |
|
getTitle
public CharSequence getTitle ()
Return an title representing the action.
| Returns | |
|---|---|
CharSequence |
|
isEnabled
public boolean isEnabled ()
Return whether this action is enabled.
| Returns | |
|---|---|
boolean |
|
setEnabled
public void setEnabled (boolean enabled)
Sets whether this action is enabled.
| Parameters | |
|---|---|
enabled |
boolean |
setShouldShowIcon
public void setShouldShowIcon (boolean shouldShowIcon)
Sets whether the icon should be shown.
| Parameters | |
|---|---|
shouldShowIcon |
boolean |
shouldShowIcon
public boolean shouldShowIcon ()
Return whether the icon should be shown.
| Returns | |
|---|---|
boolean |
|
toBundle
public Bundle toBundle ()
Converts this into a Bundle that can be converted back to a RemoteActionCompat
by calling createFromBundle(Bundle).
| Returns | |
|---|---|
Bundle |
|
toRemoteAction
public RemoteAction toRemoteAction ()
Convert this compat object to RemoteAction object.
| Returns | |
|---|---|
RemoteAction |
RemoteAction object
|
Annotations
Interfaces
Classes
- ActivityCompat
- ActivityManagerCompat
- ActivityOptionsCompat
- AlarmManagerCompat
- AppComponentFactory
- AppLaunchChecker
- AppOpsManagerCompat
- BundleCompat
- DialogCompat
- FrameMetricsAggregator
- JobIntentService
- NavUtils
- NotificationCompat
- NotificationCompat.Action
- NotificationCompat.Action.Builder
- NotificationCompat.Action.WearableExtender
- NotificationCompat.BigPictureStyle
- NotificationCompat.BigTextStyle
- NotificationCompat.Builder
- NotificationCompat.CarExtender
- NotificationCompat.CarExtender.UnreadConversation
- NotificationCompat.CarExtender.UnreadConversation.Builder
- NotificationCompat.DecoratedCustomViewStyle
- NotificationCompat.InboxStyle
- NotificationCompat.MessagingStyle
- NotificationCompat.MessagingStyle.Message
- NotificationCompat.Style
- NotificationCompat.WearableExtender
- NotificationCompatExtras
- NotificationCompatSideChannelService
- NotificationManagerCompat
- Person
- Person.Builder
- RemoteActionCompat
- RemoteInput
- RemoteInput.Builder
- ServiceCompat
- ShareCompat
- ShareCompat.IntentBuilder
- ShareCompat.IntentReader
- SharedElementCallback
- TaskStackBuilder