Questions tagged [jobservice]
110 questions
0
votes
1 answer
Firebase job service started with big delay
I am testing an application that receives Firebase cloud data messages and processes them in the Firebase job service. Receiving messages in the FirebaseMessagingService occurs instantly and without problems, but the Firebase job service sometimes…

SolderingIronMen
- 554
- 1
- 5
- 20
0
votes
1 answer
Counting Steps with JobService and STEP_COUNTER Sensor
I’ve implemented a steps counting feature in my app. I used a JobService which listens to the Sensor.TYPE_STEP_COUNTER events and it is working.
I have 2 issues and maybe someone could help:
1) If the app isn’t opened everyday, because of doze…

yadit
- 91
- 4
0
votes
1 answer
JobScheduler - Updating job info after creating job
I want to sync data to server after certain amount of time and this time is configurable ranging from 30 minutes to 8 hours.
I am using JobScheduler to achieve above.
Is there any way using which I can update the JobInfo associated with…

Vivek
- 4,170
- 6
- 36
- 50
0
votes
0 answers
fusedLocationProviderClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper()) is making android app to crash
This is the stack trace shown in Log Cat. I'm requesting location updates in a JobService:
fusedLocationProviderClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper())
The app works fine if I comment this line. Please…

Manjunath
- 1
- 2
0
votes
0 answers
Can't create handler inside thread that has not called Looper.prepare() in JobService
I am adding a JobService to my app using which I need to access an API every 2 hours.
I have added the JobService code below and scheduled it in my SplashActivity where I have my API function to get data from server but it is throwing this error.…

mishti
- 183
- 7
- 20
0
votes
0 answers
Android - FirebaseJobDispatcher - contentUriTrigger does not work
I am building simple android app responsible for image encryption.
This application should automatically detect images with sensitive data (documents or faces) right after it is stored on device and suggest to user to encrypt it using notification…

Adrian Hrinko
- 11
- 3
0
votes
2 answers
onTaskRemoved() doesn't work on Android 8.0 Oreo API level 26
On device with Android Oreo 8.0 (API level 26) JobService.onTaskRemoved() isn't called
How to listen for such an event?
Code used which stopped working:
class TaskRemovalWatcherService: JobIntentService() {
...
override fun…

StepanM
- 4,222
- 1
- 21
- 25
0
votes
1 answer
JobService not running on Android Things
I try to work with JobScheduler and JobService on Android Things
My installation is RPI (Raspberry Pi) running IoT RPI3 1.0.2
this is my simple code:
package com.mystuff.jobservicetest;
import android.app.Activity;
import…

webaloman
- 221
- 1
- 4
- 14
0
votes
1 answer
JobService skips some sms in android oreo
I am creating a job service.
This service will be triggered based on change in sms(sent), works fine but failed to catch some messages.
ComponentName component = new ComponentName(context, jobTest.class);
Uri uri =…

Bhargav
- 266
- 3
- 9
0
votes
1 answer
android onLocationChanged method not called after few minutes when app is closed
I created service and firebase job service too. They work perfectly when app is closed.
I want get user's location every minute and send to server when app is closed
This is my jobservice:
class NeverEndingJob : JobService() {
var counter =…

Muhammadjon Xasanov
- 369
- 1
- 3
- 7
0
votes
2 answers
Avoid implementing method twice (Classes already extending abstract classes)
I have a Plugin.java class where I define two methods, one to use a JobScheduler (if API >= 21), and other to use an AlarmManager (if API < 21).
@Override
public void onCreate() {
super.onCreate();
if (Build.VERSION.SDK_INT >=…

Ricardo Faria
- 764
- 13
- 30
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
0
votes
1 answer
JobService in Android
Is the service the only thing that runs when the service is called? What I mean is that when an application runs, it has a init kind of function, that loads helper services, databases, IoC. In iOS the app delegate is called, so that you can init…

Pulkit Sethi
- 1,325
- 1
- 14
- 22
0
votes
1 answer
Can't cancel and schedule Android Job Service again
I have job service that upload files to server. I'm trying to cancel and schedule it again after it but job isn't scheduling again.
I do it like this:
jobScheduler.cancel(UPLOADER_JOB_ID);
jobScheduler.schedule(jobInfo);
This is happening…

Olexii Muraviov
- 1,456
- 1
- 12
- 36
0
votes
1 answer
Jobscheduler not starting job
I made a class RefreshService that extends JobService, and in it I have a static method scheduleJob():
public static void scheduleJob(final Context context) {
final JobScheduler jobScheduler = (JobScheduler)…

Quorrin
- 99
- 1
- 3
- 10