googlearchive / firebase-jobdispatcher-android

DEPRECATED please see the README.md below for details.
Apache License 2.0
1.79k stars 209 forks source link

Job is not rescheduled with targetSdkVersion 26 #200

Closed carlocodega closed 4 years ago

carlocodega commented 6 years ago

I'm trying to change the targetSdkVersion to 26 (Android 8) but I realized that jobs are never recheduled, and subsequent triggers for the same job don't work.

Device: Google Pixel

I'm scheduling using a content provider trigger:

Job job = dispatcher.newJobBuilder() .setService(AutoImportJob.class) .setTag(buildJobTag(observedUri)) .setRecurring(true) .setLifetime(Lifetime.UNTIL_NEXT_BOOT) .setTrigger(Trigger.contentUriTrigger(Arrays.asList(observedUri))) .setReplaceCurrent(true) .setRetryStrategy(RetryStrategy.DEFAULT_LINEAR) .setExtras(extras) .build();

Note: jobs rescheduling works properly by reverting targetSdkVersion to 25

carlocodega commented 6 years ago

Can I enable JobDispatcher logs? Can they help?

amlwin commented 6 years ago

Its currently fine on my project which is also targeting api 26

YassinAJDI commented 6 years ago

make sure you add android.permission.RECEIVE_BOOT_COMPLETED

samtstern commented 4 years ago

In April 2019 we announced that Firebase Job Dispatcher would be deprecated today, April 7th 2020. For this reason we are going to close all open issues and archive the repository. We will also stop supporting FJD for new app installations (such as those targeting sdk versions greater than Android Q). Existing apps that rely on FJD should continue to function as usual.

While we will no longer work on FJD, we encourage you to migrate to Work Manager which is a superior tool and fully supported by the Android team.

Thank you for taking the time to try the library and provide this feedback. We sincerely appreciate your effort and we apologize for not addressing it in time.