次の方法で共有


Notification.Action Class

Definition

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, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/app/Notification$Action", DoNotGenerateAcw=true)>]
type Notification.Action = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
Notification.Action
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 android.os.Build.VERSION_CODES#S, apps targeting API level android.os.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.

Java documentation 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

Notification.Action(Int32, ICharSequence, PendingIntent)

This member is deprecated.

Notification.Action(Int32, String, PendingIntent)
Notification.Action(IntPtr, JniHandleOwnership)

Fields

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

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 Object.

(Inherited from Object)
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.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
SemanticAction

Returns the SemanticAction associated with this Action.

ThresholdClass
ThresholdType
Title

Title of the action.

Methods

Clone()
DescribeContents()
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
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)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (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)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to