Notification.Action.Builder Constructors
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.
Overloads
| Name | Description |
|---|---|
| Notification.Action.Builder(Notification+Action) |
Construct a new builder for Action object using the fields from an Action. |
| Notification.Action.Builder(Icon, ICharSequence, PendingIntent) |
Construct a new builder for Action object. |
| Notification.Action.Builder(Icon, String, PendingIntent) |
Construct a new builder for Action object. |
| Notification.Action.Builder(Int32, ICharSequence, PendingIntent) |
Construct a new builder for Action object. |
| Notification.Action.Builder(Int32, String, PendingIntent) |
Construct a new builder for Action object. |
Notification.Action.Builder(Notification+Action)
Construct a new builder for Action object using the fields from an Action.
[Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Action;)V", "")]
public Builder(Android.App.Notification.Action? action);
[<Android.Runtime.Register(".ctor", "(Landroid/app/Notification$Action;)V", "")>]
new Android.App.Notification.Action.Builder : Android.App.Notification.Action -> Android.App.Notification.Action.Builder
Parameters
- action
- Notification.Action
Notification.Action: the action to read fields from
- Attributes
Remarks
Construct a new builder for Action object using the fields from an Action.
Android reference for android.app.Notification.Action.Builder.Builder.
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.
Applies to
Notification.Action.Builder(Icon, ICharSequence, PendingIntent)
Construct a new builder for Action object.
[Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=23)]
public Builder(Android.Graphics.Drawables.Icon? icon, Java.Lang.ICharSequence? title, Android.App.PendingIntent? intent);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=23)>]
new Android.App.Notification.Action.Builder : Android.Graphics.Drawables.Icon * Java.Lang.ICharSequence * Android.App.PendingIntent -> Android.App.Notification.Action.Builder
Parameters
- icon
- Icon
Icon: icon to show for this action
- title
- ICharSequence
CharSequence: the title of the action
- intent
- PendingIntent
PendingIntent: the PendingIntent to fire when users trigger this action. May be null, in which case the action may be rendered in a disabled presentation by the system UI.
- Attributes
Remarks
Construct a new builder for Action object. 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. How an Action is displayed, including whether the icon, text, or both are displayed or required, depends on where and how the action is used, and the ERROR(Style/android.app.Notification.Action.Style Style) applied to the Notification. As of Android Build.VERSION_CODES.N, action button icons will not be displayed on action buttons, but are still required and are available to notification listeners, which may display them in other contexts, for example on a wearable device. When the title is a Spanned, any colors set by a ForegroundColorSpan or TextAppearanceSpan may be removed or displayed with an altered in luminance to ensure proper contrast within the Notification.
Android reference for android.app.Notification.Action.Builder.Builder.
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.
Applies to
Notification.Action.Builder(Icon, String, PendingIntent)
Construct a new builder for Action object.
[Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=23)]
public Builder(Android.Graphics.Drawables.Icon? icon, string? title, Android.App.PendingIntent? intent);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=23)>]
new Android.App.Notification.Action.Builder : Android.Graphics.Drawables.Icon * string * Android.App.PendingIntent -> Android.App.Notification.Action.Builder
Parameters
- icon
- Icon
Icon: icon to show for this action
- title
- String
CharSequence: the title of the action
- intent
- PendingIntent
PendingIntent: the PendingIntent to fire when users trigger this action. May be null, in which case the action may be rendered in a disabled presentation by the system UI.
- Attributes
Remarks
Construct a new builder for Action object. 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. How an Action is displayed, including whether the icon, text, or both are displayed or required, depends on where and how the action is used, and the ERROR(Style/android.app.Notification.Action.Style Style) applied to the Notification. As of Android Build.VERSION_CODES.N, action button icons will not be displayed on action buttons, but are still required and are available to notification listeners, which may display them in other contexts, for example on a wearable device. When the title is a Spanned, any colors set by a ForegroundColorSpan or TextAppearanceSpan may be removed or displayed with an altered in luminance to ensure proper contrast within the Notification.
Android reference for android.app.Notification.Action.Builder.Builder.
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.
Applies to
Notification.Action.Builder(Int32, ICharSequence, PendingIntent)
Construct a new builder for Action object.
[Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)V", "")]
public Builder(int icon, Java.Lang.ICharSequence? title, Android.App.PendingIntent? intent);
[<Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)V", "")>]
new Android.App.Notification.Action.Builder : int * Java.Lang.ICharSequence * Android.App.PendingIntent -> Android.App.Notification.Action.Builder
Parameters
- icon
- Int32
int: icon to show for this action
- title
- ICharSequence
CharSequence: the title of the action
- intent
- PendingIntent
PendingIntent: the PendingIntent to fire when users trigger this action. May be null, in which case the action may be rendered in a disabled presentation by the system UI.
- Attributes
Remarks
Construct a new builder for Action object. As of Android Build.VERSION_CODES.N, action button icons will not be displayed on action buttons, but are still required and are available to notification listeners, which may display them in other contexts, for example on a wearable device.
Android reference for android.app.Notification.Action.Builder.Builder.
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.
Applies to
Notification.Action.Builder(Int32, String, PendingIntent)
Construct a new builder for Action object.
[Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)V", "")]
public Builder(int icon, string? title, Android.App.PendingIntent? intent);
[<Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)V", "")>]
new Android.App.Notification.Action.Builder : int * string * Android.App.PendingIntent -> Android.App.Notification.Action.Builder
Parameters
- icon
- Int32
int: icon to show for this action
- title
- String
CharSequence: the title of the action
- intent
- PendingIntent
PendingIntent: the PendingIntent to fire when users trigger this action. May be null, in which case the action may be rendered in a disabled presentation by the system UI.
- Attributes
Remarks
Construct a new builder for Action object. As of Android Build.VERSION_CODES.N, action button icons will not be displayed on action buttons, but are still required and are available to notification listeners, which may display them in other contexts, for example on a wearable device.
Android reference for android.app.Notification.Action.Builder.Builder.
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.