次の方法で共有


Notification.Builder Constructors

Definition

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.

Java documentation for android.app.Notification.Builder.Notification$Builder(android.content.Context).

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:

Java documentation for android.app.Notification.Builder.Notification$Builder(android.content.Context, java.lang.String).

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

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

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.

Applies to