Questions tagged [jobservice]
110 questions
43
votes
2 answers
JobService does not require android.permission.BIND_JOB_SERVICE permission
I am getting does not require android.permission.BIND_JOB_SERVICE permission error while scheduling my JobService and I already have the bind permissions. Below is my code.
JobScheduler jobScheduler = (JobScheduler)…

Akhilesh Mani
- 3,502
- 5
- 28
- 59
37
votes
12 answers
Custom JobIntentService onHandleWork not called
I recently was updating an app that I work on to handle notifications from push using a JobIntentService instead of a regular IntentService because it seems like the correct way to handle this on pre-Lollipop devices as well as post. I am enqueueing…

Eshaan
- 673
- 1
- 7
- 11
14
votes
1 answer
How to check JobService is running or not in android?
I am using JobService in my project. It's working good. But sometimes service stopped. It is not restart again. So that I am trying to strat the JobService if not running. But I don't know how to check JobService is already running or not. Please…

Vijayadhas Chandrasekaran
- 1,621
- 2
- 26
- 56
12
votes
2 answers
Pass data from Activity to JobService
I want to get lat and longitude value from Activity class to JobService. How can I do that? I'd tried using Intent with putExtras etc(please have a look at the code below) but could not make it right.
MainActivity.class
protected void…

Amrita Stha
- 2,973
- 3
- 25
- 46
10
votes
2 answers
How to fix "specify a valid range of job id's for WorkManager to use"
I've extended JobService as such:
public class MyJobService extends JobService {
@Override
public boolean onStartJob(JobParameters params) {
return false;
}
@Override
public boolean onStopJob(JobParameters params) {
…

Name Surname
- 197
- 1
- 14
10
votes
0 answers
java.lang.IllegalArgumentException: Given work is not active exception in Oreo while i m using unique job id across the app
How to handle this kind of exception? Given work is not active exception in Oreo while i m using unique job id across the app.
java.lang.RuntimeException: An error occurred while executing doInBackground()
at…

Vikas Rai
- 327
- 3
- 10
9
votes
2 answers
What is a JobService in Android
I am inspecting the latest samples in Android-L developer SDK. There is a sample class in android-L/ui/views/Clipping/ClippingBasic called TestJobService. It extends from JobService, which in turn extends from Service. I see that JobService is a…

IgorGanapolsky
- 26,189
- 23
- 116
- 147
8
votes
1 answer
Firing JobService without constraints
I have small problem when on some devices my notification that is no background not fires sometimes on android O (Particularly on Xiaomi). I am using Awareness API which I receive data from BroadcastReceiver .So... what I thought to do is put my…

Dim
- 4,527
- 15
- 80
- 139
7
votes
0 answers
Android periodic JobService never starts
I have a JobService that I would like to start periodically.
At the moment, for testing, I am using a trivial one:
public class SenderService extends JobService {
@Override
public boolean onStartJob(final JobParameters params) {
new…

dariosalvi
- 405
- 4
- 13
6
votes
1 answer
How to correctly use a JobService?
I have implemented an application in Android that uses JobService to check for updates. I have tested it with some devices: Samsung J3, RedMi 5+, RedMi note pro, MI A2 lite. It is working correctly in J3 but, in other phones that I have tested…

Mukhammadsher
- 182
- 3
- 21
6
votes
1 answer
JobService does not get rescheduled in android 9
I'm trying to get my app working on Android 9. The following code works fine up to Android 8, but for some reason, the JobService does not get rescheduled on android 9. It gets scheduled the first time but does not get rescheduled according to the…

Linus Nox
- 67
- 1
- 6
6
votes
4 answers
How to stop JobService Scheduled to when app is removed from background?
Currently i am working with an application and my app has a feature that the user will be able to click on a Navigate button and my app will start the Google Map. Till now it's fine and i have done it. But the fact where i am stuck is that i want my…

Anik Dey
- 616
- 8
- 17
5
votes
4 answers
Android: How to use JobFinished of JobService
I didn't see example of using jobFinshed of JobService, seems like we have to track changes when some condition meet we have to call jobFinished() method, am I right?

blackHawk
- 6,047
- 13
- 57
- 100
4
votes
2 answers
Run worker every time internet is available
I am developing an Android app, and I used the Firebase JobDispatcher library to run a background job every time the user turns on Wi-Fi or mobile data, but unfortunately the library was deprecated and now the new WorkerManager is the way to go.
My…

Waxren
- 2,002
- 4
- 30
- 43
4
votes
4 answers
Can I send Notification using job scheduler?
I'm trying to have Notification very time the Job service run. It's not working. I want to know the right way of providing notification when the Job service is enabled. Please help me in understanding these concepts and how to make it work?
Note:…

Anitha B S
- 101
- 1
- 8