Notification 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() |
Constructs a Notification object with default values. |
| Notification(Parcel) |
Unflatten the notification from a parcel. |
| Notification(Int32, ICharSequence) |
Constructs a |
| Notification(Int32, String) |
Constructs a |
| Notification(IntPtr, JniHandleOwnership) |
Initializes a managed representation of an existing Java Native Interface object. |
| Notification(Int32, ICharSequence, Int64) |
Obsolete.
This constructor is deprecated. |
| Notification(Int32, String, Int64) |
This constructor is deprecated. |
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 should use Builder instead.
Android reference 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
Parcel
- Attributes
Remarks
Unflatten the notification from a parcel.
Android reference 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(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
- tickerText
- ICharSequence
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
- tickerText
- String
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)
Initializes a managed representation of an existing Java Native Interface object.
protected Notification(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.Notification : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.Notification
Parameters
- javaReference
-
IntPtr
nativeint
The Java Native Interface object reference.
- transfer
- JniHandleOwnership
The ownership transfer to apply to the Java Native Interface object reference.
Remarks
This constructor is called by the .NET for Android binding runtime when it creates a managed peer for an existing Java object.
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
This constructor is deprecated.
[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
int: the resource id of the icon to put in the status bar
- tickerText
- ICharSequence
CharSequence: the text that flows by in the status bar when the notification first activates
- when
- Int64
long: the time to show in the time field, in the System.currentTimeMillis timebase
- Attributes
Remarks
This constructor is deprecated. Use Builder instead.
Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.
Android reference 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(Int32, String, Int64)
This constructor is deprecated.
[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
int: the resource id of the icon to put in the status bar
- tickerText
- String
CharSequence: the text that flows by in the status bar when the notification first activates
- when
- Int64
long: the time to show in the time field, in the System.currentTimeMillis timebase
- Attributes
Remarks
This constructor is deprecated. Use Builder instead.
Constructs a Notification object with the information needed to have a status bar icon without the standard expanded view.
Android reference 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.