Questions tagged [android-job]

For using android-job as an alternative to low level schedulers built into android.

An utility library for Android to run jobs delayed in the background. Depending on the Android version either the JobScheduler, GcmNetworkManager or AlarmManager is getting used.

39 questions
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…
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?
5
votes
1 answer

How to test Evernote's Android Jobs?

How do I test Jobs created with Android-Job library? Any ideas on unit testing, instrumented testing or even manual testing are appreciated, I just want to check if it works as expected. To be specific, I have a job that performs an HTTP request…
4
votes
0 answers

My Job not listed in pending job : android JobScheduler

Scenario Hi, I have a JobService that I launch when I come to my HomeScreen. This job service takes my requests out from my DB and execute them whenever internet is available. So even if the device is offline, I insert my transactions in my DB and…
4
votes
1 answer

Set job scheduler when screen is on (device NOT idle)?

I know that the method setRequiresDeviceIdle(boolean requiresDeviceIdle) makes the job run when the device to be in idle mode. What I want is the opposite, I want the job to run when the device isn't in idle mode (screen is on and the user is using…
3
votes
0 answers

Bind to an Android Service from a Android JobService

Due to Android O background services restrictions, I have to make some changes to my application's logic without affecting the behavior. Question: Can I bind to an android service from a Android JobService. The documentation says bound services are…
3
votes
0 answers

Job running at application startup and shouldn't

I have an android-job from the Evernote lib. The job is set to run periodically on certain circumstances. So the job build is only called when I want to start a job periodically (which is not at the beginning of my app) Create a JobService: class…
Maurice
  • 2,129
  • 2
  • 25
  • 33
3
votes
0 answers

Exact Job scheduling doesn't work when App is killed for long time (>1 min) on One Plus 5T(Nougat)

I am trying to show a notification once a day at exact time. I am using Evernote Android Job library for this https://github.com/evernote/android-job. The time is coming from backend API. Below code is working fine when app is in foreground or…
Shikhar Deep
  • 253
  • 2
  • 8
  • 19
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

setRequiredNetworkType doesn't work on periodic tasks?

The following bit of code, from my understanding, is supposed to set a periodic job that only runs if there is a network connectivity. Meaning that despite being periodic, it won't run unless the required condition is met. But that doesn't work. It…
2
votes
1 answer

Oppo Realme1 Job Schduler Min interval for Periodic Work is 1 hr

Currently I am using WorkManager 1.0.0-alpha05. I set periodic Work Request using below code. When interval is below 1 hr then In Oppo Realme (Android Version - 8.1.0 , ColorOSVersion V5.0) job execute at 1 hr. When interval greater than 1 hr job…
2
votes
0 answers

Evernote Android-job not getting triggered periodically

I have a task which should be triggered periodically every 15 mins once it is scheduled. Below given is the code I use, int jobId = new JobRequest.Builder(WallpaperJob.TAG) .setPeriodic(TimeUnit.MINUTES.toMillis(15),…
2
votes
1 answer

JobDispacter vs Android-job(Evernote)

I have a query regarding which API to use for running background jobs for devices which are below 5.1(LOLLIPOP). As JobScheduler API supports only 5.1 and above devices. I wanted to implement a background job API for devices below 5.1. Any one who…
2
votes
2 answers

Have a job run at certain time of day, everyday with Evernote's android-job

Is their a pattern for having Evernote's android-job run a job at between 1AM and 2AM everyday? I was thinking it might make sense to do something like having in my Application.onCreate and at the end of my Job.onRunJob // use the current time to…
Victory
  • 5,811
  • 2
  • 26
  • 45
2
votes
2 answers

How to reschedule JobScheduler?

How to reschedule JobScheduler that I started with setPeriodic(), I want to change the scheduler time later with user input. JobInfo.Builder builder = new JobInfo.Builder(JOB_ID, new ComponentName(this, MyJobScheduler.class)); builder …
katwal-Dipak
  • 3,523
  • 2
  • 23
  • 23
1
2 3