Questions tagged [jobintentservice]

98 questions
0
votes
1 answer

Handling JobIntentService and Thread Sleep

Background: Recently I had to migrate a Service to JobIntentService (JIS) for supporting Android 8.0 background service restrictions. This service registers the token with my server after FirebaseInstanceIDService invokes it. Problem: I have a…
RmK
  • 1,408
  • 15
  • 28
0
votes
2 answers

Geofencing doesn't work with JobIntentService anymore

I have a IntentService for Geofences, that I would simply just start. but it has to run in the background, so in Android 8 it sometimes gets whitelisted. So I hard I need to use the…
0
votes
0 answers

Caused by java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

Initializing a Handler inside JobIntentService when offline invokes this issue Caused by java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.(Handler.java:200) …
Ankur
  • 677
  • 1
  • 7
  • 21
0
votes
0 answers

How to manage single object of WebSocket using OkHttp in JobIntentService?

I had to replace Service due to Android Oreo issue and I am planning to use JobIntentService, but now JobIntentService is creating multiple connection of WebSocket in JobIntentService how can I prevent this?
Sthita
  • 1,750
  • 2
  • 19
  • 38
0
votes
1 answer

Using Firestore from a JobIntentService: Failed to gain exclusive lock to the Firestore client's offline persistence

Whenever I exit the app while I have an alarm set and the alarm goes off while the app is "DEAD" I get an Exception while trying to update a field in Firestore. The code works when the app is running in the foreground so I really have no clue of…
0
votes
0 answers

How to read a sensor in a JobIntentService?

I'm writing an Android app targeting 8 Oreo starting from API level 19. I want to query the data of Sensor.TYPE_STEP_COUNTER. Since to my understanding there is no way to read the current value directly, I have to create a SensorEventListener wait…
0
votes
1 answer

BadParcelableException with JobIntentService

Using JobIntentService on Android O, getting BadParcelable Android runtime exception while trying to read an extra which is parcelable. No issues observed on < O where JobIntentService starts the service immediately AndroidRuntime:…
Harini S
  • 563
  • 4
  • 8
-1
votes
1 answer

Show notification every 1 minute Android

I want to run a service whenever the user opens the app and then make it run as long as the app is installed for every 1 minute. The service will check if there are new orders by making an API call and if there are then it'll show a notification. I…
Akram Hussain
  • 472
  • 8
  • 23
1 2 3 4 5 6
7