Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is android-priority-job-queue and job scheduler two different things?

Tags:

android

jobs

I just want to put my finger on this issue: is android-priority-job-queue: https://github.com/yigit/android-priority-jobqueue

and android job scheduler :http://developer.android.com/reference/android/app/job/JobScheduler.html

two different things? or is the android-priority-jobqueue a huge resemblance?

They have similar characteristics, but bottom line my conclusion is that they are two different things. For example I can schedule a job to run when there is unmetered network using job scheduler, but in job queue I need to configure it.

Am I missing something?? Thanks very much in advance.

like image 677
shaya ajzner Avatar asked Feb 17 '16 17:02

shaya ajzner


1 Answers

These are two very different things.

The library "Android Priority Job Queue" is intended to solve the problem where you have lots of things you want to run in the background and want a way to manage them so they don't overload your app. The expectation is that you want these bits of work to run as soon as possible and you want to show the results in an activity in your app (but not necessarily).

JobScheduler is used when you have work that needs to be scheduled and run at some time in the future, maybe ever after your app's process has been killed. It's sensitive to device circumstances like deep sleep and network connectivity so work can be scheduled at the best possible time without draining battery.

like image 58
Doug Stevenson Avatar answered Oct 02 '22 01:10

Doug Stevenson