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
70
votes
1 answer

Firebase JobDispatcher - how does it work compared to previous APIs (JobScheduler and GcmTaskService)?

Background Google has multiple solutions for job/task scheduling, such as JobScheduler and GcmTaskService. Each has its own advantages and disadvantages. Recently, Google presented a new library called "Firebase JobDispatcher". The problem Sadly,…
13
votes
2 answers

Android - Firebase jobdispatcher

I would like to know if it's possible to use Firebase jobdispatcher to schedule an url hit and get the response in order to update the db. I would like it to run once per day at night. Does anyone know if this is possible? I can't find any good…
Sol
  • 833
  • 1
  • 9
  • 17
12
votes
3 answers

Schedule recurring job using firebase job dispatcher

I am trying to post the location of the android device to server every 10 minutes. I am using firebase job dispatcher to do this FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(this)); Job myJob =…
kranthi117
  • 628
  • 1
  • 8
  • 21
11
votes
3 answers

Why Firebase JobDispatcher run JobService 2 times?

As From Firebase JobDispatcher Documentation Firebase JobDispatcher setTrigger(Trigger.executionWindow(0, 60)) // start between 0 and 60 seconds but why my sevice running two time Firebase JobDispacther Code FirebaseJobDispatcher dispatcher =…
Salman500
  • 1,213
  • 1
  • 17
  • 35
10
votes
1 answer

Firebase JobDispatcher vs Evernote Android Job - how do these two compare?

Currently, in Android, to do a task periodically based on time or any other factors like charging state, network state etc, the basic three options are: Android AlarmManager (which works periodically based on time), GCMTaskService (requires Google…
9
votes
0 answers

Firebase Job Dispatcher not working properly on Custom ROMs like OnePlus, Xiaomi, Lenovo

I have a task to perform which requires internet and has to be performed everyday indefinitely, below is the code I had written to perform the same FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(this)); Job…
9
votes
1 answer

Location Updates using JobScheduler API

below is my demo code to start a job using FireBaseJobDispatcher. public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Hardik Mehta
  • 867
  • 1
  • 12
  • 20
7
votes
3 answers

FirebaseJobDispatcher run on network change

I am a little unsure how FirebaseJobDispatcher (JobScheduler) is suppose to work. What I want it for when a user loses internet connection then gets connectivity again for my app to run and do a sync to check for content updates upon regaining…
tyczj
  • 71,600
  • 54
  • 194
  • 296
6
votes
1 answer

Is BOOT_COMPLETED required for WorkManager?

Is RECEIVE_BOOT_COMPLETED permission required for WorkManager to reschedule the workers after reboot? if not how WorkManager handle this?
6
votes
0 answers

how to receive FCM notifications when app is removed from background in android Oreo?

I am creating a web app which sends notification from my web server to the app. I wanted my app to receive notifications even when the app is removed from the background. I am using FCM for receiving the notifications. The app receives…
6
votes
1 answer

How to check if a job is scheduled in firebase job dispatcher?

How to check if a job is scheduled in firebase job dispatcher? The below code is for Job scheduler api - public static boolean isJobServiceOn( Context context, int JOB_ID ) { JobScheduler scheduler = (JobScheduler) context.getSystemService(…
Ajoy D
  • 515
  • 4
  • 15
6
votes
2 answers

How to set the period of a periodic task in Firebase JobDispatcher?

I've read every available official docs (which is surprisingly not a lot) and all I could get for periodic tasks is this code .setRecurring(true) // start between 0 and 60 seconds from now …
6
votes
2 answers

How to use FirebaseJobDispatcher

I am trying to use FirebaseJobDispatcher by following this But My question is that, How to set time interval for the dispatcher object like GCMNetworkManager (setPeriod). Or please explain how FirebaseJobDispatcher works.
Vrushali Sabnis
  • 197
  • 2
  • 12
5
votes
1 answer

Repeating Task in Foreground service in Doze mode

I'm working on an application in which I have to do some repeating task at fixed interval (let's say after 2 mins) which should complete even in doze mode. My observations are mentioned below - Doing repeating task using Alarms (using RTC flag)…
5
votes
1 answer

How to Detect network disconnection in Firebase Job dispatcher?

In firebase Job dispatcher its possible to detect when we connect to a network, but how to detect when we disconnect from a network? Job myJob = dispatcher.newJobBuilder() .setService(MyJobService.class) .setTag("my-unique-tag") …
1
2 3
10 11