1,357 questions
0
votes
0
answers
35
views
Problem with notifications and periodic background tasks on some devices (WorkManager + Doze mode)
I’m having issues with my Android app’s notification system and scheduled background tasks.
On some devices (such as the Google Pixel 8a), notifications are not received, the database doesn’t update ...
4
votes
0
answers
157
views
Challenges Complying with Android 15 Foreground Service Limits – How to Get Notified During Timeout?
This relates to an unresolved issue on StackOverflow : Android 15 Foreground Service Timeout: How to call Service.stopSelf() when using WorkManager?
We are launching a foreground service in ...
3
votes
1
answer
74
views
How to fix java.lang.NoSuchMethodException when using a Hilt Worker?
Hilt keeps not initializing the Worker just because of sharedPreferences variable here
@HiltWorker
class AnilistNotificationWorker @AssistedInject constructor(
@Assisted private val context: ...
1
vote
0
answers
56
views
PeriodicWorkRequest is not being scheduled in my MAUI App
I need some help with my MAUI .NET 9 C# project targeting Android 15 (API 35).
I'm trying to schedule background jobs to run every 60 minutes, even when the app is closed and not in memory.
From my ...
2
votes
1
answer
82
views
WorkManager and error: no address associated with hostname
I set a Worker to run at night, with setRequiredNetworkType(NetworkType.CONNECTED) and during the run, one of the errors occurred:
Unable to resolve host "script.googleapis.com": No address ...
1
vote
1
answer
81
views
How many times I can reschedule workers with WorkManager is there a quota for this
I'm using WorkManager to show to users some notifications in case of their long inactivity in the app. So basically I detect if user left the app(app went to background or destroyed) in this case I'm ...
1
vote
0
answers
37
views
Why does WorkManager repeat the launch of a successfully completed Worker?
I can't understand why the WorkManager runs the Worker twice, not always just one of the many runs.
For example, method enqueueWorkers receives an array with one element and enqueues it as a ...
0
votes
0
answers
72
views
SQLiteDatabaseLockedException crash on WorkManager
We've recently encountered this crash but haven't been able to identify the root cause, as the error appears to be coming from WorkManager.
Workmanager version: androidx.work:work-runtime-ktx:2.7.0
...
2
votes
2
answers
109
views
How does WorkRequest setInitialDelay handle reboot?
I am writing an app that needs to schedule a one-time notification for a specific time in the future. I'm generating the notification via WorkManager.
In particular, I'm using setInitialDelay for the ...
0
votes
0
answers
32
views
How to recover PeriodicWorkRequest when marked as failed and finished?
I have a project that runs a Live WallpaperService that displays an image from a web source chosen by the user.
The wallpaper is updated via a PeriodicWorkRequest that fetches the latest image from ...
1
vote
1
answer
572
views
Flutter Android build fails with Workmanager plugin - kotlin version conflict
I'm developing a Flutter app that uses the workmanager plugin for background tasks. The app works fine on iOS, but I'm encountering build issues on Android. Here's my setup:
Flutter Workmanager Build ...
1
vote
1
answer
221
views
WorkManager with `.setRequiredNetworkType(NetworkType.UNMETERED)` has no active internet connection inside `doWork`
I am creating a backup app which backs up some files at night. Because it needs to be every night around the same time I'm using a OneTimeWorkRequest which will be scheduled again after the last time ...
0
votes
1
answer
47
views
Any way to kill ALL old work planned by WorkManager?
I had to use WorkManager on a mobile app, so it can gather current user emergencies using a PeriodicWorkRequest.
But because of my lack of documentation, I implemented it in a bad way, and I ended up ...
0
votes
0
answers
76
views
Can C# MAUI DI Contexts be shared across Android AndroidX Workmanager background workers and Maui UI pages?
Trying to create a MAUI App using SQLLite database service, and for the Database service to be used by both UI pages and WorkManager background workers. I have registered the Database service as a ...
0
votes
2
answers
170
views
Using CoroutineWorker with Android Widget in Jetpack Glance results in just a loading indicator
I have created an Android Widget using Jetpack Glance, I need to update it using CoroutineWorker so I am using WorkManager for it, here is the sample code
class MyWidget : GlanceAppWidget() {
...
1
vote
1
answer
82
views
PeriodicWorkRequest running too frequently
I am trying to implement a worker that updates my weather data every 1.5 hours. I am using PeriodicWorkRequestBuilder and have specified the time as shown in my code:
@RequiresApi(Build.VERSION_CODES....
0
votes
0
answers
73
views
Best practices for working with worker and Flow
I'm working on an application that uses WorkerManager for background tasks, most of the time it's used to send requests to the backend and process the received data, I thought it would be a great idea ...
0
votes
0
answers
61
views
WorkManager custom WorkerFactory with context
how to do this if Context is only available in onCreate so workManagerConfiguration can't be initialised?
class MyApplication : Application(), Configuration.Provider {
lateinit var appContainer: ...
0
votes
0
answers
49
views
Android's WorkManager's Notification gets stuck when constraints are not met
I have a WorkManager Worker that has a required network type of NetworkType.UNMETERED as a constraint. It shows a notification while it's running.
When the device loses connection to wifi and goes to ...
0
votes
1
answer
78
views
Download 500 MB in android
I am writing an application to download 6 files of size 500 MB approx. I implemented the download manager and it was working fine but find a few issues in production like "Android DownloadManager ...
1
vote
1
answer
150
views
Background worker doesn't work on real devices
The application requires periodic (15-30 mins) data synchronization with the backend.
I implemented this using the WorkManager API, but I encountered the issue that synchronization only triggers when ...
0
votes
1
answer
203
views
Is it possible the android OS cancel my worker of Workmanager?
In my CoroutineWorker.doWork() of an OneTimeWork, a CancellationException was caught. But I am sure I never cancel it.
Is it possible the android OS cancel my worker? If so, where can I find the ...
-1
votes
1
answer
50
views
State-modifying calls in Android apps and UI feedback
In an Android app, let's say there is a settings screen and the settings are stored on a server.
Whenever the user changes settings a state-modifying HTTP call (POST/PUT/PATCH/DELETE) is made.
What is ...
0
votes
0
answers
104
views
How to prevent WorkManager from restarting when force-stop
I'm developing a timer app using WorkManager.
When the timer starts, it runs in the doWork method of WorkManager.
However, while the timer is running in the background through doWork, if the user ...
1
vote
1
answer
137
views
PeriodicWorkRequest status stuck at Enqueued
I'm working on an Android App to send out notifications when a date stored in a local database is reached. To do this, I'm attempting to use a periodic work request that will call a function to ...