Browse Source

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

Neeraj Gupta 3 years ago
parent
commit
36982adcd8
1 changed files with 2 additions and 2 deletions
  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) {