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.

Filter by
Sorted by
Tagged with
0votes
0answers
17views

WorkManager loses data for Satisfied CONTENT_TRIGGER on "cancelled while waiting for bind" event

I observe changes in resources like images for example. From time to time events for changes are lost. I check the JS dump with the following command: adb shell dumpsys jobscheduler I can see the ...
user avatar
1vote
0answers
22views

Data Content Observer changes not works in all devices

Dears, I implemented content observer for media files by using workerManager API. Tested in two different devices of the Same model and os (12) But strangely in one device, we were able to receive ...
user avatar
0votes
0answers
47views

Dagger hilt with room and job scheduler

I want to locally store data in absence of internet connection and thus am using job scheduler to schedule my syncing. So my service needs access to dao and I am not sure what the correct components ...
user avatar
0votes
0answers
11views

Does initialDelay while running a job, isn't compatible with periodicity?

Got some error while using periodic task with initialDelay in jobScheduler. How to solve if i don't want to compromise and want to run with both conditions?
user avatar
0votes
0answers
73views

How can I keep running a my application even after killing it?

class MainActivity : AppCompatActivity(), SensorEventListener { private var sensorManager: SensorManager? = null private var running = false private var totalSteps = 0f private var ...
user avatar
0votes
1answer
425views

calling an api multiple times using WorkManager in android

I want to call an api multiple times using WorkManager. where idsArrayList is a list of ids. I send each id in the api as Path to get response and similarly for other ids. I want the workManager to ...
user avatar
0votes
0answers
10views

Azkaban Scheduler- wrong display of jobs' processing bar and cannot update job's status

I have a flow comprises several jobs. Each job is to execute a shell script and I put exit code in each of them. However, if any if any of the job fails, the running jobs will remains in running and ...
user avatar
0votes
1answer
47views

impossible to start the onStartJob method

I have the following code: MainActivity.java package com.example.bluejob; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.app.job.JobInfo; import android.app....
user avatar
6votes
1answer
324views

Job Scheduler not starting jobs in locked/direct boot on Android 12

I am working on making my alarm app compatible with a soon to be released Android 12 and lately I stumbled upon a problem. It seems that since Android 12 update, jobs scheduled in Job Scheduler during ...
user avatar
  • 1,822
0votes
1answer
105views

How to automatically Start an activity at the same time for all clients?

I am making an android game app with java in which users have options to register for a game and play the game when it starts at a time in the future (say game starts at 5:00 PM today). My problem is ...
user avatar
0votes
0answers
27views

run a Job when device is charging using android JobScheduler

we can't use manifest broadcast receiver to detect if the device is charging. can we use jobscheduler to detect if the device is charging ? i.e if the device is plugged in start my activity.. any ...
user avatar
  • 31
0votes
1answer
113views

Android remainder app using job scheduler

I am making remainder app. After reading documentation I came to know that I should use Job Scheduler instead of Alarm Manager. I am using job scheduler recursively but after 10... 15 hours this ...
user avatar
0votes
0answers
31views

Android WorkManager - Trigger constraint state is not accessible

I have the following case with work in the WorkManager: Point in time A (waiting for Wi-Fi and change in data): Required constraints: CONTENT_TRIGGER CONNECTIVITY Satisfied constraints: "not ...
user avatar
0votes
0answers
51views

Android App killed state local notification not receiving - specifically Chinese rom devices

Alarm Manager - (better) not working in specific devices if app is not running Work Manager - if app is not running nothing happening Job scheduler - same if app is not running nothing happening
user avatar
-2votes
1answer
52views

Show pop up after some time when internet is connected and apk is closed

I wanna develop apk where apk works is show pop up screen after some time when internet is connected
user avatar
0votes
0answers
34views

I have a requirement to restart my app after Every 3 hours

I'm developing android app in which I'm showing media in slide show. App remain working 24 by 7 as it is used for advertisement purpose but it automatically crashes sometimes after some days don't ...
user avatar
3votes
0answers
81views

onStartJob not getting called on API 30

I have a requirement to create a channel on android TV after apk is installed but before app is first launched. So as soon as apk is installed i need to run a piece of code to create the channel on ...
user avatar
  • 3,530
2votes
1answer
376views

Periodic job in Android Job Scheduler not working as expected

I have a requirement to sync data from server to my local device in specified time interval, for that I am using Android JobScheduler. But it is not working as expected. For example I scheduled ...
user avatar
2votes
0answers
95views

Cancel unique periodic work from within the Worker class for a unique set of data

I have a Worker class where I am executing the logic of the scheduled periodic work request inside the doWork() method. However, after a certain condition is met inside the doWork() condition, I want ...
user avatar
  • 481
1vote
0answers
17views

Hands-free app to display information while navigating with Google Maps

I want to find a hands-free method of periodically displaying information (drawn from a local database) while I am navigating using Google Maps without disrupting Google Maps. I started with the ...
user avatar
  • 3,494
0votes
1answer
322views

Work Manager's Periodic Work Request executing multiple requests for the same work at a given instance

I have a work manager in my android application and I am using it to implement a Period Work Request to send an email after every 15 minutes, however, sometimes, after 15 minutes, instead of 1 e-mail, ...
user avatar
  • 481
0votes
1answer
171views

Work Manager sending wrong input data to the Worker class when performing periodic work request in my activity. How to fix it?

I am performing a Periodic Work Request in my activity using Work Manager, and want to send data from my activity to the Worker class using setInputData(). I am sending flightnumber and departuredate ...
user avatar
  • 481
0votes
1answer
57views

How can I use Static Broadcast Receiver or similar service in Android API 30 device?

I want to schedule a task for every minute on my application and want the task to be executed even when the application/activity is not opened in foreground. How can I achieve that? I am running my ...
user avatar
  • 481
1vote
1answer
283views

JobScheduler - How to skip first job run of periodic job?

in my app i have set a periodic job that is set to run every 30 minutes. The first job run occurs right when I do schedule that periodic job, which is not wanted in my case. What I want is to skip the ...
user avatar
0votes
1answer
204views

Scheduling task with JobScheduler in Android causes UI freeze on app launch

While trying to find out why my android app (java) was not responding for the first 2-3 seconds after launching (UI elements were loaded, apart from menu options, but I could not click anything), I ...
user avatar
1vote
1answer
127views

Android background process loading data from webpage every minute

I'm working on an Android app with a constant repeating background process. From the moment the device starts it should load data off a webpage every minute. It uses XmlPullParser and a simple URL ...
user avatar
0votes
0answers
31views

Android multiple file download and simultaneously update ui

I am developing an application with a content download feature. The requirement is to download more than 100 files (gif, image, video) with a single click of download. For this, I am using download ...
user avatar
1vote
0answers
213views

Apps may not schedule more than 100 distinct jobs JobScheduler Android

I have a particular crash happening on Samsung devices for the most part with Android version 10. I have a JobScheduler which schedules jobs and has them in a queue for later execution. ComponentName ...
user avatar
0votes
1answer
41views

open phone dialer even if app is closed on specific time

I want to open android phone dialer on specific time from my app even if my app is closed. I tried AlarmManager for this - AlarmManager alarmManager = (AlarmManager) getSystemService(...
user avatar
1vote
1answer
165views

How to preserve context in JobScheduler

I have a job as under public class MyPeriodicJob extends JobService{ @Override public boolean onStartJob(JobParameters jobParameters) { // do something (but context is needed) ...
user avatar
  • 2,586
3votes
1answer
221views

Why I see: Unsatisfied constraints: CONNECTIVITY in JobScheduler debug info

I set for the job: val job = JobInfo.Builder(2, ComponentName(context, JobRunner::class.java)).apply { setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED) ...
user avatar
0votes
1answer
86views

How to pass room instance to JobService?

To save something param to local in JobScheduler, I have implemented below JobService, class MyJobService : JobService() { private var context = applicationContext private var db = Room....
user avatar
1vote
1answer
154views

Where I can find JobScheduler debug documentation

I have the following data from the debug: JOB #u0a231/5: a2826a0 com.abc.workmanagertest/androidx.work.impl.background.systemjob.SystemJobService u0a231 tag=*job*/com.abc.workmanagertest/androidx....
user avatar
0votes
0answers
87views

How to call Activity Context in JobService for permission?

For getting Location in JobScheduler, I need to get Activity Context for calling ActivityCompat.requestPermissions in onStartJob. ActivityCompat.requestPermissions({}, permissions, REQUEST_CODE); But ...
user avatar
0votes
0answers
51views

Android: I'm trying to delete the pictures in the gallery using the Jobscheduler, but I can't delete them

I'm creating an Android app that manages screenshot folders in the gallery. One of the functions of the app is to automatically delete screenshot images, and to do this, I created two classes: ...
user avatar
  • 3
3votes
1answer
512views

How get step count from background app using JobScheduler

The Android docs for the STEP_COUNTER sensor are a bit confusing. According to this: Android Sensor doc I should always register the STEP_COUNTER sensor because otherwise the step counter sensor will ...
user avatar
0votes
1answer
40views

Is it possible to create Alarm app that runs on post Oreo devices

In past we had Alarm Manager, Intent Services, Implicit broadcast receivers, that can run even when app is not in the background. But today (post oreo) we have Work Manager & Job Schedulers. They ...
user avatar
  • 3
0votes
1answer
1kviews

Android WorkManager: Is it possible to set task's maximum execution duration

I have a periodic task that requesting location updates on the background, but I need to restrict this task too work for a long period of time, as it will drain battery, so I need to stop it after a ...
user avatar
1vote
0answers
68views

How make a Foreground Service doens't stop after several hours

i did a Foreground Service and it's works. However after several hours running it stops working. Hours later it back to work. I need a service which keep running unstoppable, or only more unstoppable ...
user avatar
  • 129
1vote
1answer
125views

Alarms and jobs being cleared when application is closed?

So, I am trying to run a service in the background that can send some app data to my server So far I've tried using AlarmManager, JobScheduler classes to run the service periodically but its no use ...
user avatar
  • 11
1vote
1answer
439views

Periodic task killed when app is stopped on Android 8+

Hello everyone i'm trying to implement a periodic task on Android but i'm stuck on some devices. I need to run a task in background every 15 or 30 minutes. This works well on Android pre 8.0. But on 8+...
user avatar
0votes
0answers
48views

Better method to replace AsyncTask being deprecated to get data from server

I see there are several options to replace AsyncTask now being deprecated. I get a little unsure or confuse or both which option is best to use. Actually my asynctask get data form a server, which can ...
user avatar
2votes
1answer
708views

My JobService not working in Android 10 but Working fine in Android 9 and lower

I'm creating an Android app that sends a notification when user copy to clipboard from system while the app is running in the background. For this, I'm using JobService. But my JobService not working ...
user avatar
0votes
1answer
43views

How to open app after rebooting or charging api 27+

The application should autostart after restarting the phone and when charging is connected, I did it like this: manifest <receiver android:name=".ChargingReceiver"> <intent-...
user avatar
  • 109
1vote
0answers
487views

What happens when kotlin coroutines started and suddenly app is moved to background and becomes idle?

I need to know, when to use the service in android for simple network task. Before that i tried with the simple example. Case 1 : Launched a new coroutine in my application and inside the suspend fun ...
user avatar
  • 874
3votes
1answer
2kviews

Android Background Bluetooth Processing: What's the best approach?

I've just develop an Android app (minSdkVersion 23/ targetSdkVersion 29) that can connect to a BluetoothLE device to obtain data periodically. Now, in the MainActivity (not the first activity), I do ...
user avatar
0votes
1answer
325views

WorkManager startWork() never calls when constraints are met

I want to WorkManager startWork() to be called every time the user connects to the internet through wifi or 3g/4g/5g. It calls only one time at the start where I register it. enqueuing work when a ...
user avatar
1vote
0answers
53views

Android JobScheduler not running period task on Vivo phone

I have a job scheduler designed to repeat every 20 minutes. I have tried it on nexus, one plus, moto E4 and Vivo. It seems do the periodic job roughly every 20 minutes in all these phones except on ...
user avatar
  • 11.3k
0votes
0answers
59views

Periodic Job Scheduler not working on Oppo and Realme Android Device

Simple job scheduler is working fine in android device. When i add setPeriodic , my job scheduler is not working on oppo and realme android device var jobScheduler = getSystemService(Context....
user avatar
1vote
1answer
101views

Android: JobScheduler sometimes reuses the same job instance?

I always thought that if you schedule a job it would always create a new JobService instance for that job. After some testing, it looks like it uses the same job instance sometimes? Sometimes it would ...
user avatar
  • 1,663

15 30 50 per page
1
2 3 4 5
11