Notification.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
Notification.Builder(Context) |
This member is deprecated. |
Notification.Builder(Context, String) |
Constructs a new Builder with the defaults: |
Notification.Builder(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Notification.Builder(Context)
This member is deprecated.
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
public Builder (Android.Content.Context? context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.App.Notification.Builder : Android.Content.Context -> Android.App.Notification.Builder
Parameters
- context
- Context
An Context that will be used by the Builder to construct the RemoteViews. The Context will not be held past the lifetime of this Builder object.
- Attributes
Remarks
This member is deprecated. use #Builder(Context, String)
instead. All posted Notifications must specify a NotificationChannel Id.
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.Builder(Context, String)
Constructs a new Builder with the defaults:
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/lang/String;)V", "", ApiSince=26)]
public Builder (Android.Content.Context? context, string? channelId);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Ljava/lang/String;)V", "", ApiSince=26)>]
new Android.App.Notification.Builder : Android.Content.Context * string -> Android.App.Notification.Builder
Parameters
- context
- Context
A Context
that will be used by the Builder to construct the
RemoteViews. The Context will not be held past the lifetime of this Builder
object.
- channelId
- String
The constructed Notification will be posted on this
NotificationChannel
. To use a NotificationChannel, it must first be
created using NotificationManager#createNotificationChannel
.
- Attributes
Remarks
Constructs a new Builder with the defaults:
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.Builder(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected Builder (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.Notification.Builder : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.Notification.Builder
Parameters
- transfer
- JniHandleOwnership
A JniHandleOwnershipindicating how to handle javaReference
Remarks
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.