@@ -3,7 +3,6 @@ import 'dart:developer';
33import 'package:device_info_plus/device_info_plus.dart' ;
44import 'package:flutter/services.dart' ;
55import 'package:flutter_easyloading/flutter_easyloading.dart' ;
6- import 'package:flutter_foreground_task/flutter_foreground_task.dart' ;
76import 'package:path_provider/path_provider.dart' ;
87import 'package:permission_handler/permission_handler.dart' ;
98import 'package:yande_gui/download_foreground_service_plugin.dart' ;
@@ -87,22 +86,6 @@ class DownloaderAndroid<T> extends DownloaderPlatform<T> {
8786 SettingsService .maxConcurrentDownloadsStream.listen ((_) {
8887 _downloadQueueManager.schedule ();
8988 });
90- FlutterForegroundTask .init (
91- androidNotificationOptions: AndroidNotificationOptions (
92- channelId: 'foreground_service' ,
93- channelName: 'Foreground Service Notification' ,
94- channelDescription: 'This notification appears when the foreground service is running.' ,
95- onlyAlertOnce: true ,
96- ),
97- iosNotificationOptions: const IOSNotificationOptions (showNotification: false , playSound: false ),
98- foregroundTaskOptions: ForegroundTaskOptions (
99- eventAction: ForegroundTaskEventAction .repeat (5000 ),
100- autoRunOnBoot: true ,
101- autoRunOnMyPackageReplaced: true ,
102- allowWakeLock: true ,
103- allowWifiLock: true ,
104- ),
105- );
10689 }
10790
10891 @override
@@ -157,10 +140,6 @@ class DownloaderAndroid<T> extends DownloaderPlatform<T> {
157140 task.emit (task.state.copyWith (status: DownloadStatus .busying));
158141 break ;
159142 case DownloadEventProgress (: final value):
160- FlutterForegroundTask .updateService (
161- notificationTitle: 'Yande GUI Downloader' ,
162- notificationText: '${task .fileName } ${(value * 100 ).toStringAsFixed (2 )}%' ,
163- );
164143 task.emit (task.state.copyWith (status: DownloadStatus .busying, progress: value));
165144 break ;
166145 case DownloadEventSuccess ():
0 commit comments