Selaa lähdekoodia

BackgroundFetch: run when there's any network and device battery is not low

Neeraj Gupta 3 vuotta sitten
vanhempi
commit
36982adcd8
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      lib/app.dart

+ 2 - 2
lib/app.dart

@@ -329,11 +329,11 @@ class _EnteAppState extends State<EnteApp> with WidgetsBindingObserver {
           stopOnTerminate: false,
           startOnBoot: true,
           enableHeadless: true,
-          requiresBatteryNotLow: false,
+          requiresBatteryNotLow: true,
           requiresCharging: false,
           requiresStorageNotLow: false,
           requiresDeviceIdle: false,
-          requiredNetworkType: NetworkType.NONE,
+          requiredNetworkType: NetworkType.ANY,
         ), (String taskId) async {
       await widget.runBackgroundTask(taskId);
     }, (taskId) {