Notification.Builder Class

Definition

Builder class for Notification objects.

[Android.Runtime.Register("android/app/Notification$Builder", DoNotGenerateAcw=true)]
public class Notification.Builder : Java.Lang.Object
[<Android.Runtime.Register("android/app/Notification$Builder", DoNotGenerateAcw=true)>]
type Notification.Builder = class
    inherit Object
Inheritance
Notification.Builder
Attributes

Remarks

Android platform documentation

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.

Constructors

Notification.Builder(Context)
Obsolete.

Constructs a new Builder.

Notification.Builder(Context, String)
Notification.Builder(IntPtr, JniHandleOwnership)

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

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Extras

Metadata for the notification.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Notification
Obsolete.

The notification object being built by this builder.

PeerReference (Inherited from Object)
Style
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

AddAction(Int32, ICharSequence, PendingIntent)
Obsolete.

Add an action (with a corresponding title and intent) to this notification.

AddAction(Int32, String, PendingIntent)
Obsolete.

Add an action (with a corresponding title and intent) to this notification.

AddAction(Notification+Action)

Add an action to this notification.

AddExtras(Bundle)

Merge additional metadata into this notification.

AddPerson(Person)
AddPerson(String)
Obsolete.

Add a person that is relevant to this notification.

Build()

Build a new Notification object.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CreateBigContentView()
CreateContentView()
CreateHeadsUpContentView()
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Extend(Notification+IExtender)

Apply an extender to this notification builder.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
RecoverBuilder(Context, Notification)
SetActions(Notification+Action[])
SetAllowSystemGeneratedContextualActions(Boolean)
SetAutoCancel(Boolean)

Make this notification automatically dismissed when the user touches it.

SetBadgeIconType(NotificationBadgeIconType)
SetBubbleMetadata(Notification+BubbleMetadata)
SetCategory(String)

Set the notification category.

SetChannelId(String)
SetChronometerCountDown(Boolean)
SetColor(Int32)

Set the accent color of the notification.

SetColorized(Boolean)
SetContent(RemoteViews)
Obsolete.

Supply a custom RemoteViews object to use instead of the platform template.

SetContentInfo(ICharSequence)
Obsolete.

Add a small piece of additional information pertaining to this notification.

SetContentInfo(String)
Obsolete.

Add a small piece of additional information pertaining to this notification.

SetContentIntent(PendingIntent)

Supply a PendingIntent to be sent when the notification is clicked.

SetContentText(ICharSequence)

Set the second line of text in the platform notification template.

SetContentText(String)

Set the second line of text in the platform notification template.

SetContentTitle(ICharSequence)

Set the first line of text in the platform notification template.

SetContentTitle(String)

Set the first line of text in the platform notification template.

SetCustomBigContentView(RemoteViews)
SetCustomContentView(RemoteViews)
SetCustomHeadsUpContentView(RemoteViews)
SetDefaults(NotificationDefaults)
Obsolete.

Set which notification properties will be inherited from system defaults.

SetDeleteIntent(PendingIntent)

Supply a PendingIntent to send when the notification is cleared explicitly by the user.

SetExtras(Bundle)

Set metadata for this notification.

SetFlag(Int32, Boolean)
SetForegroundServiceBehavior(Int32)
SetFullScreenIntent(PendingIntent, Boolean)

Specifies an intent to launch instead of posting the notification to the status bar.

SetGroup(String)

Set this notification to be part of a group of notifications sharing the same key.

SetGroupAlertBehavior(NotificationGroupAlertBehavior)
SetGroupSummary(Boolean)

Set this notification to be the group summary for a group of notifications.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetLargeIcon(Bitmap)

Add a large icon to the notification (and the ticker on some devices).

SetLargeIcon(Icon)
SetLights(Int32, Int32, Int32)
Obsolete.

Set the desired color for the indicator LED on the device, as well as the blink duty cycle (specified in milliseconds).

SetLocalOnly(Boolean)

Set whether or not this notification should not bridge to other devices.

SetLocusId(LocusId)
SetNumber(Int32)

Set the large number at the right-hand side of the notification.

SetOngoing(Boolean)

Set whether this is an "ongoing" notification.

SetOnlyAlertOnce(Boolean)

Play sound, vibrate and ticker only if the notification is not already showing.

SetPriority(Int32)
Obsolete.

Set the priority of this notification.

SetProgress(Int32, Int32, Boolean)

Set the progress that this notification represents.

SetPublicVersion(Notification)

Supply a public version of the notification.

SetRemoteInputHistory(ICharSequence[])
SetRemoteInputHistory(String[])
SetSettingsText(ICharSequence)
SetSettingsText(String)
SetShortcutId(String)
SetShowWhen(Boolean)

Control whether the timestamp is shown in the content view.

SetSmallIcon(Icon)
SetSmallIcon(Int32)

Set the small icon resource, which will be used to represent the notification in the status bar.

SetSmallIcon(Int32, Int32)

Set the small icon resource for the specified level.

SetSortKey(String)

Set a sort key that orders this notification among other notifications from the same package.

SetSound(Uri)
Obsolete.

Set the alert sound to play.

SetSound(Uri, AudioAttributes)
Obsolete.

Set the alert sound to play, along with sound attributes to use during playback.

SetSound(Uri, Stream)
Obsolete.

Set the sound to play, along with a specific stream on which to play it.

SetStyle(Notification+Style)

Add a rich notification style to be applied at build time.

SetSubText(ICharSequence)

Set the third line of text in the platform notification template.

SetSubText(String)

Set the third line of text in the platform notification template.

SetTicker(ICharSequence)

Set the "ticker" text which is displayed in the status bar when the notification first arrives.

SetTicker(ICharSequence, RemoteViews)
Obsolete.

Set the ticker text and associated RemoteViews.

SetTicker(String)

Set the "ticker" text which is displayed in the status bar when the notification first arrives.

SetTicker(String, RemoteViews)
Obsolete.

Set the ticker text.

SetTimeoutAfter(Int64)
SetUsesChronometer(Boolean)

Show the When field as a stopwatch.

SetVibrate(Int64[])
Obsolete.

Set the alert vibration pattern to use.

SetVisibility(NotificationVisibility)

Specify the visibility of the notification contents.

SetWhen(Int64)

Add a timestamp pertaining to the notification (usually the time the event occurred).

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to