Questions tagged [firebase-job-dispatcher]

The Firebase JobDispatcher is a library for scheduling background jobs in your Android app.

The Firebase JobDispatcher library provides a JobScheduler-compatible API that works on all recent versions of Android (API level 9+) that have Google Play services installed.

It is available for Android developers: https://github.com/firebase/firebase-jobdispatcher-android

A version for iOS developers is WIP: https://github.com/firebase/firebase-jobdispatcher-ios

159 questions
5
votes
2 answers

How to prevent Context leak in AsyncTask used by JobService

I need to do some background work which requires a Context in a JobService (I'm using the Firebase JobDispatcher one because we support api 16+) I've read a lot of articles about the JobService and AsyncTasks but I'm unable to find any good articles…
Sander
  • 808
  • 6
  • 18
5
votes
1 answer

Firebase job dispatcher is not executing when app is closed

I have setup a job through firebase job dispatcher, which should execute after X-hours. It works fine when app is open or in background but not working when app is closed. Too many people have faced this issue, even such issues are still open in…
Zeero0
  • 2,602
  • 1
  • 21
  • 36
4
votes
0 answers

Perform a job using firebase job dispatcher only when there is no network available

According to the Constraint class of Firebase Job dispatcher, we can perform jobs when network is connected, or charging, etc. How to perform a job when the internet is disconnected. Here is a similar question that went unanswered.
Debanjan
  • 2,817
  • 2
  • 24
  • 43
4
votes
0 answers

How can I use the firebaseJobDispatcher to receive continuous updates for location?

Level I am a beginner Task To run an android service that sends location updates (latitude, longitude) to a database periodically while a driver is driving (to track location) every 5mins. I want to update the database with location even if the app…
4
votes
1 answer

Does Firebase Job dispatcher needs internet access for scheduling job?

Does Firebase Job dispatcher needs Internet access for scheduling job? When I turn off my Internet access it seems like the scheduled job is not doing anything at all. When I turn it on back, the scheduled job starts the working. This my code for…
callmejeevan
  • 1,040
  • 1
  • 9
  • 18
4
votes
2 answers

JobDispatcher.cancel() is not calling onStopJob()

I have used FirebaseJobDispatcher in my project. This is the sample code. public class MyCustomDispatcher extends JobService { @Override public boolean onStartJob(JobParameters job) { Log.e("MyCustomDispatcher", "onStartJob() called…
Ravi
  • 34,851
  • 21
  • 122
  • 183
4
votes
0 answers

Stop a Firebase JobDispatcher service

I have a recurring job service using Firebase JobDispatcher which will keep tracking the device GPS location. How can I stop the service so that the application will not track the location on a button click from any activity. FirebaseJobDispatcher…
dharanbro
  • 1,327
  • 4
  • 17
  • 40
4
votes
3 answers

Firebase JobDispatcher-Scheduled jobs are lost on device reboot

I am using Firebase-JobDispatcher.I have scheduled some jobs and its working fine if i keep the device switch on.But if i reboot my device then the scheduled jobs doesn't execute or it doesn't get rescheduled?I have used…
3
votes
1 answer

Android WorkManager PeriodicWorkRequest issue -- not running after app is closed

I have been trying to migrate from Firebase Job Dispatcher to androidx Work Manager. My app was working well with Job Dispatcher. The problem with Work Manager is that it doesn't execute the Periodic Work after the app is closed. Without Periodic…
3
votes
1 answer

How to perform background service while battery optimization is active

I currently use the Firebase JobDipatcher to perform a periodic task in the background. The problem is the background service only gets executed when battery optimization is disabled and standby state of the app is manually set to ACTIVE under…
3
votes
0 answers

FirebaseJobDispatcher - schedule calendar events

I need to implement calendar notifications similar to Google Calendar notifications. Notifications should work offline, so FCM is not an option. I tried to use Firebase Job Scheduler, my schedule is created like this: FirebaseJobDispatcher…
user1209216
  • 7,404
  • 12
  • 60
  • 123
3
votes
1 answer

Confused in choosing between Firebase JobDispatcher vs AlarmManager

I am creating a alarm like application where user can add a remainder for particular date and time, they can also choose repeat to repeat the remainder. And I don't do any network specific job in remainder. But in future I may need to use the…
3
votes
1 answer

Firebase Jobdispatcher - Start now AND repeat

Per this example, I see that I can have the job start now using Trigger.NOW or a time of 0,0: Bundle myExtrasBundle = new Bundle(); myExtrasBundle.putString("some_key", "some_value"); Job myJob = dispatcher.newJobBuilder() // the JobService…
Psest328
  • 6,575
  • 11
  • 55
  • 90
3
votes
1 answer

Trigger on WiFi connected Android

Background info So I have created an app that is mainly controlled by a notification that's supported by a service. This notification disapears when a user loses connection to a specific WiFi network, and has to appear when the user get's back home…
Beuz
  • 193
  • 1
  • 12
3
votes
0 answers

How to bound the service, JobService, with firebase jobdispatcher

I want to update my UI component like the textview, but localbinder, onbind, onStartCommand are final of the jobservice in jodispatcher library so that I can implement the bound service in my activity just as below code: /** Defines callbacks…
Weng YX.
  • 61
  • 5
1
2
3
10 11