Questions tagged [flutter-workmanager]
61 questions
8
votes
3 answers
Flutter work-manager returns "Worker result FAILURE for Work [ id=XXXXXxXXXXxXXXX tags={ be.tramckrijte.workmanager.BackgroundWorker } ]"
I am building an application which notifies user about the prayer time. I am using adhan package to calculate the time and save it in shared preference. Since the prayer time changes every 24 hours so I am using workmanager to get the prayer time…

zoldyck-kun21
- 83
- 1
- 4
8
votes
1 answer
Flutter WorkManager plugin and SQLite issue
Maybe someone can share some code example or maybe explain. I use WorkManger Flutter plugin. The idea is to make background task which update sqlite db on device. Plugin works it's executing task but no updates in DB , if I run methods which works…

TomLynx23
- 113
- 1
- 3
6
votes
2 answers
initialize workmanager in flutter for ios
i'm trying to set up ios configration as document
https://github.com/fluttercommunity/flutter_workmanager/blob/main/IOS_SETUP.md
what's the wrong with this set up
i have this error:
Unhandled Exception: PlatformException(bgTaskSchedulingFailed(Error…

MikeNabil
- 81
- 6
6
votes
1 answer
How to send data to the main isolate from workmananger's isolate?
My problem is that flutter Hive cannot be opened from multiple isolates. So I want the data fetched in workmananger task to be sent to the main isolate where the hive box is opened and modify it there to avoid corrupting it. I should take into…

anass naoushi
- 859
- 2
- 10
- 25
5
votes
2 answers
How to run workmanager Task only when app is closed?
I need to run a background task through flutter workmanager but only when app is closed. How to achieve such a behavior. Code sample would be good. Thanks in advance

anass naoushi
- 859
- 2
- 10
- 25
3
votes
2 answers
Show flutter local notification when firebase notification received in foreground and background
I am trying to show flutter local notification when receiving firebase notification in background, foreground and terminated states of app. i am trying to resolve this using work manager package and it is working like a charm in android. it works in…

Karen Ghazaryan
- 108
- 7
3
votes
0 answers
How to invoke method channel from Workmanager task
I have a method channel registered in the Android build's MainActivity class, which works fine when called from the foreground application.
I want to call this method channel from a task that Workmanager runs in the background, but I'm getting a…

Julian
- 105
- 1
- 5
3
votes
2 answers
Flutter: can't initialize shared preferences with workmanager
As the title say, I'm using 2 plugins, workmanager and shared preferences. The workmanager part works as it's supposed to, while I get an error from shared preferences.
This is part of my code which has to do with the workmanager plugin:
void…

Cedric
- 470
- 6
- 20
3
votes
1 answer
Flutter IOS Workmanager Background Fetch Never Called in Production
I'm seemingly unable to get background fetch working with Flutter workmanager on IOS.
I can confirm that it is working when called within xcode through debug. Just never when deployed to the device.
I've got my workmanager initialised and callback…

BadgerHobbs
- 181
- 14
3
votes
1 answer
Flutter Provider with Workmanager
I use Provider with Workmanager
Workmanager is especially useful to run periodic tasks, such as fetching remote data on a regular basis.
I use Workmanager for get Notification in Background
but I need way when I get notification I need call function…

SAWA Group
- 101
- 1
- 7
2
votes
0 answers
catch answer of WorkManager
I want to update the background color of my app in terms of result of my background task.
I use flutter_bloc and WorkManager.
I want my app to be blue during the action, and green if the result is good and red if my function throw an exception.
Or…

AntoineD
- 21
- 3
2
votes
2 answers
Flutter: Notification Navigation from Background Task without context issue
My App does the following: It runs a background Task using Flutter Workmanager which checks some values and then it throws a Notification via Flutter Local Notification. In the initialize method from FlutterLocalNotifications Plugin, i can specify a…

Nyancat92
- 41
- 4
2
votes
0 answers
Flutter show local notifications at exact time using workmanager
I want to set the local notification in flutter (android app), I got to know about workmanager package but I don't know how to use it for my purpose. I want to send notifications at the exact time which is selected by the user.
Time…

Sanchay Kasturey
- 161
- 1
- 17
2
votes
1 answer
Flutter WorkManager Background Fetch Example With StateFull Widget
I have a function called control in the StateFull Widget. I want to run this function with WorkManager every 15 minutes.
How can I call the control function from the callbackDispatcher function?
I added a Stream statically to the Statefull widget…

Ahmet Aytanozu
- 111
- 2
- 9
2
votes
0 answers
Sqflite flutter communicating with main isolate
A number of plugins (flutter_uploader, workmanager etc) call a top level static handler in dart using PluginUtilities.getCallbackHandle which runs from a separate isolate.
In this handler we want to access sqflite. We understand we cannot do this…

user3707
- 1,470
- 2
- 15
- 21