Questions tagged [jobintentservice]
98 questions
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
26
votes
1 answer
When to use JobIntentService vs WorkManager?
Google recently deprecated IntentService as of: https://android.googlesource.com/platform/frameworks/base.git/+/6f8b09029932dfd24945202017639754b00acc2e
The docs for IntentService now say:
* @deprecated IntentService is subject to all the
*

satur9nine
- 13,927
- 5
- 80
- 123
26
votes
1 answer
SecurityException: Caller no longer running
I am facing below issue in Android O and above when trying to run my JobIntentService, I am having a tough time to reproduce the issue :
Caused by java.lang.SecurityException: Caller no longer running, last stopped +206ms because: timed out while…

Santhosh
- 1,867
- 2
- 16
- 23
18
votes
3 answers
What are differences between JobIntentService and IntentService?
I do not understand what difference between those two APIs. I mean when to use the first one. Why is there JobIntentService ?
Thanks in advance

Moahemd Abdelkhaleq
- 212
- 1
- 2
- 10
11
votes
1 answer
IntentService is deprecated, how do I replace it with JobIntentService?
Following FetchAddressIntentService implementation with IntentService (in kotlin):
class FetchAddressIntentService //Constructor of this service
: IntentService(INTENTTAG) {
//Receiver where results are forwarded from this service
…

Roar Grønmo
- 2,926
- 2
- 24
- 37
10
votes
0 answers
JobIntentService job ID globally unique or scoped by the class?
Documentation implies it's scoped per the service class:
A unique job ID for scheduling; must be the same value for all work
enqueued for the same class.
However, I have two services with their JOB_ID, and enqueWork() as:
companion object {
…

Jeffrey Blattman
- 22,176
- 9
- 79
- 134
10
votes
4 answers
IllegalArgumentException: No such service ComponentInfo{JobIntentService}
SO answers regarding this issue has not helped me, I have declared all permissions and already have, accepted answers in my code.
AppInfoJobService(CustomJobIntentService) throws following error on Android OS 8+ devices and it happens rarely, not…

shalini
- 355
- 4
- 17
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
1 answer
JobIntentService crashing in above Android O (8) and above after targeting api 26
I had changed target to API 27 (Android O) and migrated IntentService to JobIntentService after that It started crash in some devices on Android O(8) and above.
Here is crash log.
Fatal Exception: java.lang.RuntimeException: An error occurred while…

Ashish Kumar Maurya
- 174
- 2
- 5
9
votes
3 answers
Android Oreo JobIntentService Keep running in background for Android 7 &below and crashing often in Android 8 & above
I have recently replaced all my service to foreground services and JobIntentService since there are some background execution limits (https://developer.android.com/about/versions/oreo/background) in oreo and above. As per documentation,…

Kalai.G
- 1,610
- 13
- 22
8
votes
2 answers
How to remove duplicate intent from JobIntentService
I have a JobIntentService that is launched every time a push notification comes in to tell the service to go fetch more data. While the app is in the foreground everything works as it should.
When the app is in the background and multiple push…

tyczj
- 71,600
- 54
- 194
- 296
8
votes
1 answer
SecurityException: Caller no longer running, last stopped
Description:
We have been observing this crash on our fire base console for the users which have android 8 (Oreo) + devices. Stack trace shows that its your internal method which is causing this fatal exception.
Environment And Device Details
Device…

Fazal Hussain
- 1,129
- 12
- 28
6
votes
1 answer
Migrating from IntentService to JobIntentService for Android O
Previously I was using IntentService to send data to the server periodically. However, since Android O limiting background task and processes I am moving towards JobIntentService.
My Activity code to schedule an alarm
Intent intent = new…

Kunu
- 5,078
- 6
- 33
- 61
4
votes
2 answers
Android JobIntentService - onStartCommand vs onHandleWork
I'm currently extending from Service class for my customized service implementation. As part of Android-O migration, I want to use JobIntentService.
Currenlty all my logic is in service's onStartCommand method.
However, as per JobIntentService I…

Amrut
- 2,655
- 3
- 24
- 44
3
votes
0 answers
Android Widget button service does not respond to click
Similar questions: service not starting on oreo in app widgetusing The closest to my question is Widget freezes after some time but is unanswered.
I have a simple widget button that should send a notification when pressed. It doesn't work when:
I…

Anand Goswami
- 153
- 9