瀏覽代碼

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

Neeraj Gupta 3 年之前
父節點
當前提交
36982adcd8
共有 1 個文件被更改,包括 2 次插入2 次删除
  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) {