Closed jarvis432 closed 4 years ago
did you found the solution ?
Settings constraints twice can't be a good start..?
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.
I have a service to get the current location of the user and uploading the data to firebase database. When my app is in active state it runs perfectly fine but when app is killed it runs for some time around 20 times and then stops and then runs after 12 hr again for around 20 times and then stops . This is how I schedule my job.
var driver : Driver = GooglePlayDriver(this) var firebaseJobDispatcher : FirebaseJobDispatcher = FirebaseJobDispatcher(driver) var myJob : Job = firebaseJobDispatcher.newJobBuilder() .setService(JobSchedulerService::class.java) .setTag("firstjob") .setConstraints(Constraint.ON_ANY_NETWORK) .setLifetime(Lifetime.FOREVER) .setRecurring(true) .setConstraints(Constraint.DEVICE_IDLE,Constraint.ON_UNMETERED_NETWORK) .setTrigger(periodicTrigger(20,1)) .setReplaceCurrent(false) .build()
And this is my service class:
class JobSchedulerService : JobService(), GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {