Sdílet prostřednictvím


Notification Constructors

Definition

Overloads

Notification()

Constructs a Notification object with default values.

Notification(Parcel)

Unflatten the notification from a parcel.

Notification(Int32, ICharSequence)

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

Notification(Int32, String)

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

Notification(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Notification(Int32, ICharSequence, Int64)
Obsolete.

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

Notification(Int32, String, Int64)

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

Notification()

Constructs a Notification object with default values.

[Android.Runtime.Register(".ctor", "()V", "")]
public Notification ();
Attributes

Remarks

Constructs a Notification object with default values. You might want to consider using Builder instead.

Java documentation for android.app.Notification.Notification().

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(Parcel)

Unflatten the notification from a parcel.

[Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")]
public Notification (Android.OS.Parcel? parcel);
[<Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "")>]
new Android.App.Notification : Android.OS.Parcel -> Android.App.Notification

Parameters

parcel
Parcel

The Parcel containing notification information.

Attributes

Remarks

Unflatten the notification from a parcel.

Java documentation for android.app.Notification.Notification(android.os.Parcel).

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(Int32, ICharSequence)

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

public Notification (int icon, Java.Lang.ICharSequence tickerText);
new Android.App.Notification : int * Java.Lang.ICharSequence -> Android.App.Notification

Parameters

icon
Int32

The resource id of the icon to put in the status bar.

tickerText
ICharSequence

The text that flows by in the status bar when the notification first activates.

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

Notification(Int32, String)

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

public Notification (int icon, string tickerText);
new Android.App.Notification : int * string -> Android.App.Notification

Parameters

icon
Int32

The resource id of the icon to put in the status bar.

tickerText
String

The text that flows by in the status bar when the notification first activates.

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

Notification(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected Notification (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.Notification : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.Notification

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

Notification(Int32, ICharSequence, Int64)

Caution

deprecated

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

[Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;J)V", "")]
[System.Obsolete("deprecated")]
public Notification (int icon, Java.Lang.ICharSequence? tickerText, long when);
[<Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;J)V", "")>]
[<System.Obsolete("deprecated")>]
new Android.App.Notification : int * Java.Lang.ICharSequence * int64 -> Android.App.Notification

Parameters

icon
Int32

The resource id of the icon to put in the status bar.

tickerText
ICharSequence

The text that flows by in the status bar when the notification first activates.

when
Int64

The time to show in the time field. In the System.currentTimeMillis timebase.

Attributes

Remarks

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

This member is deprecated. Use Builder instead.

Java documentation for android.app.Notification.Notification(int, java.lang.CharSequence, long).

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(Int32, String, Int64)

Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.

[Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;J)V", "")]
public Notification (int icon, string? tickerText, long when);
[<Android.Runtime.Register(".ctor", "(ILjava/lang/CharSequence;J)V", "")>]
new Android.App.Notification : int * string * int64 -> Android.App.Notification

Parameters

icon
Int32

The resource id of the icon to put in the status bar.

tickerText
String

The text that flows by in the status bar when the notification first activates.

when
Int64

The time to show in the time field, in the System.currentTimeMillis timebase.

Attributes

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