Example usage for android.app.job JobService jobFinished

List of usage examples for android.app.job JobService jobFinished

Introduction

In this page you can find the example usage for android.app.job JobService jobFinished.

Prototype

public final void jobFinished(JobParameters params, boolean wantsReschedule) 

Source Link

Document

Call this to inform the JobScheduler that the job has finished its work.

Usage

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

public static void updateFromJob(final JobService service, final JobParameters jobParams) {
    new ShortcutUpdateTask(new DynamicShortcuts(service)) {
        @Override//from   w  w  w . j av  a 2 s . c o  m
        protected void onPostExecute(Void aVoid) {
            // Must call super first which will reschedule the job before we call jobFinished
            super.onPostExecute(aVoid);
            service.jobFinished(jobParams, false);
        }
    }.execute();
}