Questions tagged [android-jobscheduler]

Use this tag for questions related to the Android JobSchedule API for scheduling various types of jobs against the framework that will be executed in your application's own process.

Android JobScheduler is an API for scheduling various types of jobs against the framework that will be executed in your application's own process.

see the documentation for more info:

Android JobScheduler reference

558 questions
0
votes
2 answers

Support JobScheduler's JobService when minSdkVersion is pre-lollipop

My minSdk is 19 and my targetSdk is 27 I am trying to use JobScheduler for BOOT_COMPLETED for Build.Version >= 21 devices and traditional method for pre-lollipop devices. But I am getting calls require 21 current minSdk is 19. What annotations do…
user5508088
0
votes
1 answer

Which is better way to re-schedule a job on boot completed?

Job can be rescheduled in 2 ways in android job scheduler. Using .setPersisted(true) By scheduling again in BOOT_COMPLETED broadcast receiver. Which of these is a better way of doing it for periodic jobs?
Prashant Jha
  • 574
  • 6
  • 21
0
votes
2 answers

Start service with JobScheduler on Android O

I'm trying to start a IntentService to register to a firebase cloud messaging on Android O. On Android O it's not allowed to start a Intent Service "in a situation when it isn't permitted" and every one tells me to use a JobService but not how to…
0
votes
0 answers

Create a ringtone that can not be turned off until the task is completed

I'm trying to make an android alarm app that only turns off when completing a task. I tried using an activity that was turned on for the user to do the task when it was time for the alarm. The problem is that when I use the taskmanager to kill the…
0
votes
2 answers

General questions about JobScheduler

In my app I need to update user location by Geofire every 15 minutes continiously,but I am confused with some parameters.Currently I have JobScheduler jobScheduler = (JobScheduler)…
Katy Colins
  • 533
  • 2
  • 8
  • 24
0
votes
1 answer

JobScheduler API: How to execute a job once on application start and then execute the same job periodically after that?

I have searched for hours on the internet trying to find a solution to the problem I am facing but to no avail. My problem is as follows: From my understanding if you want to create a periodic job on Android using JobScheduler API you need to set…
0
votes
1 answer

How to set the exact time to android job for a daily job at fixed time?

I am trying to schedule the job which will run at 10 PM daily. I tried to use the setExact method and provide the milliseconds by converting 22 hours to milliseconds and for testing I executed the app and changed the system time to 10 PM but the job…
Sid
  • 2,792
  • 9
  • 55
  • 111
0
votes
0 answers

JobSchedule.setOverrideDeadline works as periodical timer

Despite the documentation setOverrideDeadline https://developer.android.com/reference/android/app/job/JobInfo.Builder.html#setOverrideDeadline(long) this parameter works as timer task. I mean it wakes up the device each milliseconds delay. int type…
Vyacheslav
  • 26,359
  • 19
  • 112
  • 194
0
votes
1 answer

Firebase Job Dispatcher is not calling from Thread.setDefaultUncaughtExceptionHandler

I am creating a Firebase Job Dispatcher for sending Error crash report to the server. My Service is not starting with dispatcher's mustSchedule method. It might be due to I am starting my job, not on any activity. Here is my code... Code for start…
0
votes
0 answers

How to run multiple jobs scheduled using JobScheduler one by one?

I am scheduling multiple jobs at once. I need to run multiple jobs one by one with delay between multiple jobs but some of the jobs runs in parallel. How can I schedule them so they run one after another with set delay. Following is the code used in…
Ravi Patel
  • 2,136
  • 3
  • 32
  • 48
0
votes
1 answer

stopping notifications that I lost the TAG to

I know to cancel FirebaseJobDispatcher, the code is FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(driver); dispatcher.cancelAll(); But unfortunately I scheduled some jobs already, and didn't save the drivers for those past jobs. So…
0
votes
1 answer

JobScheduler Lint warning for schedule method

Android Studio shows me a Nullpointer Lint warning for the schedule method. Can I ignore this or should I take any precautions? public void scheduleJob(View v) { ComponentName componentName = new ComponentName(this, ExampleJobService.class); …
Florian Walther
  • 6,237
  • 5
  • 46
  • 104
0
votes
1 answer

When does it make sense to pass true for needsReschedule in the jobFinished method of a JobService

When a JobService finishes and we did work in a background thread, we call jobFinished to let the system know our work is over and it can release the wakelock. jobFinished takes a boolean needsReschedule as it's 2nd argument and when we pass true,…
Florian Walther
  • 6,237
  • 5
  • 46
  • 104
0
votes
1 answer

Adding Service causes Deployment failed

I'm working on an application using Xamarin and MvvmCross framework. As I need to make the remote api call every x hours, I'm trying to implement JobScheduler. I started with adding this class: using Android.App; using Android.App.Job; namespace…
0
votes
1 answer

JobService NETWORK_TYPE_NOT_ROAMING not working in Android 8 Oreo API 26 Emulator

Our app does background work using a Job Service if the user is not roaming. This is how we schedule the job: JobInfo.Builder jobInfoBuilder = new JobInfo.Builder(JobServicesIds.CONNECTIVITY.getValue(), new ComponentName(context.getPackageName(),…
bentzy
  • 1,244
  • 2
  • 15
  • 31