Notification.Builder.SetOngoing(Boolean) Method
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.
Set whether this is an "ongoing" notification.
[Android.Runtime.Register("setOngoing", "(Z)Landroid/app/Notification$Builder;", "GetSetOngoing_ZHandler")]
public virtual Android.App.Notification.Builder SetOngoing(bool ongoing);
[<Android.Runtime.Register("setOngoing", "(Z)Landroid/app/Notification$Builder;", "GetSetOngoing_ZHandler")>]
abstract member SetOngoing : bool -> Android.App.Notification.Builder
override this.SetOngoing : bool -> Android.App.Notification.Builder
Parameters
- ongoing
- Boolean
boolean
Returns
This Android.App.Notification.Builder instance, allowing calls to be chained.
- Attributes
Remarks
Set whether this is an "ongoing" notification. Ongoing notifications cannot be dismissed by the user on locked devices, or by notification listeners, and some notifications (call, device management, media) cannot be dismissed on unlocked devices, so your application or service must take care of canceling them. They are typically used to indicate a background task that the user is actively engaged with (e.g., playing music) or is pending in some way and therefore occupying the device (e.g., a file download, sync operation, active network connection).
See also:
Android reference for android.app.Notification.Builder.setOngoing.
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.