Hello, thanks for the package.
I am trying to write data to Google's Firestore every x minutes let's say. I created App.kt and set it as android:name. And my main file is as the following:
void callbackDispatcher() {
Workmanager.executeTask((backgroundTask) {
Test.writeTestData();
return Future.value(true);
});
}
void main() {
if (Platform.isAndroid) {
Workmanager.initialize(
callbackDispatcher, // The top level function, aka Flutter entry point
isInDebugMode: true,
);
Workmanager.registerPeriodicTask("testSensor", "simplePeriodicTask", frequency: Duration(seconds: 10));
}
runApp(MyApp());
}
And the error is:
Unhandled Exception: PlatformException(error, WorkManager is not initialized properly. You have explicitly disabled WorkManagerInitializer in your manifest, have not manually called WorkManager#initialize at this point, and your Application does not implement Configuration.Provider., null)
Cheers.