Browse Source

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

Neeraj Gupta 3 năm trước cách đây
mục cha
commit
36982adcd8
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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) {