Notification.Action Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Structure to encapsulate a named action that can be shown as part of this notification.
[Android.Runtime.Register("android/app/Notification$Action", DoNotGenerateAcw=true)]
public class Notification.Action : Java.Lang.Object, Android.OS.IParcelable, IDisposable
[<Android.Runtime.Register("android/app/Notification$Action", DoNotGenerateAcw=true)>]
type Notification.Action = class
inherit Object
interface IParcelable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Inheritance
- Attributes
- Implements
Remarks
Structure to encapsulate a named action that can be shown as part of this notification. It must include an icon, a label, and a PendingIntent to be fired when the action is selected by the user. Apps should use Notification.Builder.addAction(int,CharSequence,PendingIntent) or Notification.Builder.addAction(Notification.Action) to attach actions. As of Android Build.VERSION_CODES.S, apps targeting API level Build.VERSION_CODES.S or higher won't be able to start activities while processing broadcast receivers or services in response to notification action clicks. To launch an activity in those cases, provide a PendingIntent for the activity itself.
Android reference for android.app.Notification.Action.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
| Name | Description |
|---|---|
| Notification.Action(Int32, ICharSequence, PendingIntent) |
This constructor is deprecated. |
| Notification.Action(Int32, String, PendingIntent) |
This constructor is deprecated. |
| Notification.Action(IntPtr, JniHandleOwnership) |
Initializes a managed representation of an existing Java Native Interface object. |
Fields
| Name | Description |
|---|---|
| SemanticActionArchive |
Obsolete.
SemanticAction: Archive the content associated with the notification. |
| SemanticActionCall |
Obsolete.
SemanticAction: Call a contact, group, etc. |
| SemanticActionDelete |
Obsolete.
SemanticAction: Delete the content associated with the notification. |
| SemanticActionMarkAsRead |
Obsolete.
SemanticAction: Mark content as read. |
| SemanticActionMarkAsUnread |
Obsolete.
SemanticAction: Mark content as unread. |
| SemanticActionMute |
Obsolete.
SemanticAction: Mute the content associated with the notification. |
| SemanticActionNone |
Obsolete.
No semantic action defined. |
| SemanticActionReply |
Obsolete.
SemanticAction: Reply to a conversation, chat, group, or wherever replies may be appropriate. |
| SemanticActionThumbsDown |
Obsolete.
SemanticAction: Mark content with a thumbs down. |
| SemanticActionThumbsUp |
Obsolete.
SemanticAction: Mark content with a thumbs up. |
| SemanticActionUnmute |
Obsolete.
SemanticAction: Unmute the content associated with the notification. |
Properties
| Name | Description |
|---|---|
| ActionIntent |
Intent to send when the user invokes this action. |
| AllowGeneratedReplies |
Return whether the platform should automatically generate possible replies for this Action |
| Class |
Returns the runtime class of this |
| Creator | |
| Extras |
Get additional metadata carried around with this Action. |
| Handle |
The handle to the underlying Android instance. (Inherited from Object) |
| Icon |
Return an icon representing the action. |
| IsAuthenticationRequired |
Returns whether the OS should only send this action's PendingIntent on an unlocked device. |
| IsContextual |
Returns whether this is a contextual Action, i.e. |
| JniIdentityHashCode |
Gets the identity hash code assigned to this Java peer by the interop runtime. (Inherited from Object) |
| JniManagedPeerState | (Inherited from JavaObject) |
| JniPeerMembers |
Provides JNI binding infrastructure for Android.App.Notification.Action. |
| PeerReference |
Gets the JNI object reference for this Java peer. (Inherited from Object) |
| SemanticAction |
Returns the SemanticAction associated with this Action. |
| ThresholdClass |
Provides JNI binding infrastructure for Android.App.Notification.Action. |
| ThresholdType |
Provides JNI binding infrastructure for Android.App.Notification.Action. |
| Title |
Title of the action. |
Methods
| Name | Description |
|---|---|
| Clone() |
Creates and returns a copy of this object. |
| Construct(JniObjectReference, JniObjectReferenceOptions) | (Inherited from JavaObject) |
| DescribeContents() |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Dispose() |
Releases the resources held by this Java peer. (Inherited from Object) |
| Dispose(Boolean) |
Releases the resources held by this Java peer. (Inherited from Object) |
| DisposeUnlessReferenced() | (Inherited from JavaObject) |
| Equals(Object) | (Inherited from JavaObject) |
| Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
| GetDataOnlyRemoteInputs() |
Get the list of inputs to be collected from the user that ONLY accept data when this action is sent. |
| GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
| GetRemoteInputs() |
Get the list of inputs to be collected from the user when this action is sent. |
| JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
| Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
| NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
| SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
| SetPeerReference(JniObjectReference, JniObjectReferenceOptions) | (Inherited from JavaObject) |
| ToArray<T>() |
Creates a managed array from this Java array wrapper. (Inherited from Object) |
| ToString() |
Returns a string representation of the object. (Inherited from Object) |
| UnregisterFromRuntime() |
Unregisters this Java peer from the interop runtime. (Inherited from Object) |
| Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
| Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
| Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
| WriteToParcel(Parcel, ParcelableWriteFlags) |
Flatten this object in to a Parcel. |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IJavaPeerable.Disposed() | (Inherited from JavaObject) |
| IJavaPeerable.Finalized() | (Inherited from JavaObject) |
| IJavaPeerable.JniObjectReferenceControlBlock | (Inherited from JavaObject) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from JavaObject) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from JavaObject) |
| IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from JavaObject) |
| IJavaPeerable.UnregisterFromRuntime() | |
Extension Methods
| Name | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
Gets the JNI name of the type of the instance |
| JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
| JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
| JavaCast<TResult>(IJavaObject) | |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |