Closed GunaseelanSubburam closed 4 years ago
In background service JobService getting stoped.Is there any solution for this? Whenever the app is killed the service is not working.
and second think is , is this JobService run on UIThread ?
I am facing the same issue. Can anyone help?
Hi You did not set trigger Job myJob = mDispatcher.newJobBuilder() .setService(MyJobService.class) .setTag(jobTag) .setRecurring(false) .setTrigger(Trigger.executionWindow(10, 15)) .setLifetime(Lifetime.FOREVER) .setReplaceCurrent(true) .setConstraints(Constraint.ON_ANY_NETWORK) .setRetryStrategy(RetryStrategy.DEFAULT_EXPONENTIAL) .build(); mDispatcher.mustSchedule(myJob); I hope this help you Thanks
Same problem here on Android P
I m also facing the same Problem, kindly check the code given below. I have also given the triggers.
Job logJob = getJobDispatcher().newJobBuilder() .setService(FcmTaskService.class) .setRecurring(true) .setTrigger(Trigger.executionWindow(trackingInterval, trackingInterval + 30)) .setTag(FcmTaskService.TAG_TASK) .setReplaceCurrent(true) .setConstraints(Constraint.ON_ANY_NETWORK) .build();
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.
Here is my snippet calling the service: Driver driver = new GooglePlayDriver(getApplicationContext()); FirebaseJobDispatcher firebaseJobDispatcher = new FirebaseJobDispatcher(driver); Job RemainderJob= firebaseJobDispatcher.newJobBuilder() .setService(FirebaseService.class) .setTag("Notify Tag") .setLifetime(Lifetime.UNTIL_NEXT_BOOT) //.setRecurring(true) .build(); firebaseJobDispatcher.schedule(RemainderJob);
The above code works fine when the app is in foreground/background. Whenever the app is killed the service is not working.