Android Guides | Samples

Android.App.Notification.Builder Class

Builder class for Notification objects.

See Also: Notification+Builder

Syntax

[Android.Runtime.Register("android/app/Notification$Builder", DoNotGenerateAcw=true)]
public class Notification.Builder : Object

Remarks

Provides a convenient way to set the various fields of a Notification and generate content views using the platform's notification layout template. If your app supports versions of Android as old as API level 4, you can instead use App, available in the Android Support library.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11

The members of Android.App.Notification.Builder are listed below.

See Also: Object

Public Constructors

Constructs a new Builder.

Protected Constructors

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

Public Properties

[read-only]
ExtrasBundle. Metadata for the notification.
[read-only]
NotificationNotification. The notification object being built by this builder.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

AddAction(Notification+Action) : Notification+Builder
Add an action to this notification.
AddAction(Int32, ICharSequence, PendingIntent) : Notification+Builder
Add an action (with a corresponding title and intent) to this notification.
AddAction(Int32, String, PendingIntent) : Notification+Builder
Add an action (with a corresponding title and intent) to this notification.
AddExtras(Bundle) : Notification+Builder
Merge additional metadata into this notification.
AddPerson(String) : Notification+Builder
Add a person that is relevant to this notification.
Build() : Notification
Build a new Notification object.
Extend(Notification+IExtender) : Notification+Builder
Apply an extender to this notification builder.
SetAutoCancel(Boolean) : Notification+Builder
Make this notification automatically dismissed when the user touches it.
SetCategory(String) : Notification+Builder
Set the notification category.
SetColor(Int32) : Notification+Builder
Set the accent color of the notification.
SetContent(RemoteViews) : Notification+Builder
Supply a custom RemoteViews object to use instead of the platform template.
SetContentInfo(ICharSequence) : Notification+Builder
Add a small piece of additional information pertaining to this notification.
SetContentInfo(String) : Notification+Builder
Add a small piece of additional information pertaining to this notification.
SetContentIntent(PendingIntent) : Notification+Builder
Supply a PendingIntent to be sent when the notification is clicked.
SetContentText(ICharSequence) : Notification+Builder
Set the second line of text in the platform notification template.
SetContentText(String) : Notification+Builder
Set the second line of text in the platform notification template.
SetContentTitle(ICharSequence) : Notification+Builder
Set the first line of text in the platform notification template.
SetContentTitle(String) : Notification+Builder
Set the first line of text in the platform notification template.
SetDefaults(NotificationDefaults) : Notification+Builder
Set which notification properties will be inherited from system defaults.
SetDeleteIntent(PendingIntent) : Notification+Builder
Supply a PendingIntent to send when the notification is cleared explicitly by the user.
SetExtras(Bundle) : Notification+Builder
Set metadata for this notification.
SetFullScreenIntent(PendingIntent, Boolean) : Notification+Builder
Specifies an intent to launch instead of posting the notification to the status bar.
SetGroup(String) : Notification+Builder
Set this notification to be part of a group of notifications sharing the same key.
SetGroupSummary(Boolean) : Notification+Builder
Set this notification to be the group summary for a group of notifications.
SetLargeIcon(Bitmap) : Notification+Builder
Add a large icon to the notification (and the ticker on some devices).
SetLights(Int32, Int32, Int32) : Notification+Builder
Set the desired color for the indicator LED on the device, as well as the blink duty cycle (specified in milliseconds).
SetLocalOnly(Boolean) : Notification+Builder
Set whether or not this notification should not bridge to other devices.
SetNumber(Int32) : Notification+Builder
Set the large number at the right-hand side of the notification.
SetOngoing(Boolean) : Notification+Builder
Set whether this is an "ongoing" notification.
SetOnlyAlertOnce(Boolean) : Notification+Builder
Play sound, vibrate and ticker only if the notification is not already showing.
SetPriority(Int32) : Notification+Builder
Set the priority of this notification.
SetProgress(Int32, Int32, Boolean) : Notification+Builder
Set the progress that this notification represents.
SetPublicVersion(Notification) : Notification+Builder
Supply a public version of the notification.
SetShowWhen(Boolean) : Notification+Builder
Control whether the timestamp is shown in the content view.
SetSmallIcon(Int32) : Notification+Builder
Set the small icon resource, which will be used to represent the notification in the status bar.
SetSmallIcon(Int32, Int32) : Notification+Builder
Set the small icon resource for the specified level.
SetSortKey(String) : Notification+Builder
Set a sort key that orders this notification among other notifications from the same package.
SetSound(Uri) : Notification+Builder
Set the alert sound to play.
SetSound(Uri, AudioAttributes) : Notification+Builder
Set the alert sound to play, along with sound attributes to use during playback.
SetSound(Uri, Stream) : Notification+Builder
Set the sound to play, along with a specific stream on which to play it.
SetStyle(Notification+Style) : Notification+Builder
Add a rich notification style to be applied at build time.
SetSubText(ICharSequence) : Notification+Builder
Set the third line of text in the platform notification template.
SetSubText(String) : Notification+Builder
Set the third line of text in the platform notification template.
SetTicker(ICharSequence) : Notification+Builder
Set the "ticker" text which is displayed in the status bar when the notification first arrives.
SetTicker(String) : Notification+Builder
Set the "ticker" text which is displayed in the status bar when the notification first arrives.
SetTicker(ICharSequence, RemoteViews) : Notification+Builder
Set the ticker text and associated RemoteViews.
SetTicker(String, RemoteViews) : Notification+Builder
Set the ticker text.
SetUsesChronometer(Boolean) : Notification+Builder
Show the Notification.When field as a stopwatch.
SetVibrate(Int64[]) : Notification+Builder
Set the alert vibration pattern to use.
SetVisibility(NotificationVisibility) : Notification+Builder
Specify the visibility of the notification contents.
SetWhen(Int64) : Notification+Builder
Add a timestamp pertaining to the notification (usually the time the event occurred).