Example usage for android.app.job JobScheduler getPendingJob

List of usage examples for android.app.job JobScheduler getPendingJob

Introduction

In this page you can find the example usage for android.app.job JobScheduler getPendingJob.

Prototype

public abstract @Nullable JobInfo getPendingJob(int jobId);

Source Link

Document

Look up the description of a scheduled job.

Usage

From source file:com.android.contacts.DynamicShortcuts.java

@VisibleForTesting
public static boolean isJobScheduled(Context context) {
    final JobScheduler scheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
    return scheduler.getPendingJob(ContactsJobService.DYNAMIC_SHORTCUTS_JOB_ID) != null;
}