Language

JobServiceEngine.SetNotification Method

Definition

Give JobScheduler a notification to tie to this job's lifecycle.

[Android.Runtime.Register("setNotification", "(Landroid/app/job/JobParameters;ILandroid/app/Notification;I)V", "GetSetNotification_Landroid_app_job_JobParameters_ILandroid_app_Notification_IHandler", ApiSince=34)]
public virtual void SetNotification(Android.App.Job.JobParameters params, int notificationId, Android.App.Notification notification, Android.App.Job.JobEndNotificationPolicy jobEndNotificationPolicy);
[<Android.Runtime.Register("setNotification", "(Landroid/app/job/JobParameters;ILandroid/app/Notification;I)V", "GetSetNotification_Landroid_app_job_JobParameters_ILandroid_app_Notification_IHandler", ApiSince=34)>]
abstract member SetNotification : Android.App.Job.JobParameters * int * Android.App.Notification * Android.App.Job.JobEndNotificationPolicy -> unit
override this.SetNotification : Android.App.Job.JobParameters * int * Android.App.Notification * Android.App.Job.JobEndNotificationPolicy -> unit

Parameters

params
JobParameters

The parameters identifying the running job to associate with the notification.

notificationId
Int32

The identifier used to post this job's notification.

notification
Notification

The notification to display for this job.

jobEndNotificationPolicy
JobEndNotificationPolicy

Value is one of the following: Detach; Remove

Attributes

Remarks

Give JobScheduler a notification to tie to this job's lifecycle.

Java documentation for android.app.job.JobServiceEngine.setNotification(android.app.job.JobParameters, int, android.app.Notification, int).

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