{"id":14971538,"url":"https://github.com/dev-hwang/flutter_foreground_task","last_synced_at":"2025-05-16T00:07:22.682Z","repository":{"id":38081674,"uuid":"359384192","full_name":"Dev-hwang/flutter_foreground_task","owner":"Dev-hwang","description":"This plugin is used to implement a foreground service on the Android platform.","archived":false,"fork":false,"pushed_at":"2025-04-14T13:57:14.000Z","size":699,"stargazers_count":164,"open_issues_count":22,"forks_count":122,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-16T00:07:12.081Z","etag":null,"topics":["android","background-service","flutter","foreground-notification","foreground-service","ios"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_foreground_task","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dev-hwang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-19T08:28:09.000Z","updated_at":"2025-05-07T01:04:00.000Z","dependencies_parsed_at":"2023-12-21T06:47:38.654Z","dependency_job_id":"dc5337e6-e3e4-4250-8194-d42c7d297faa","html_url":"https://github.com/Dev-hwang/flutter_foreground_task","commit_stats":{"total_commits":345,"total_committers":14,"mean_commits":"24.642857142857142","dds":0.5478260869565217,"last_synced_commit":"983245f6b9868fa94322146f7ed931fcb5cdf112"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-hwang%2Fflutter_foreground_task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-hwang%2Fflutter_foreground_task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-hwang%2Fflutter_foreground_task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-hwang%2Fflutter_foreground_task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dev-hwang","download_url":"https://codeload.github.com/Dev-hwang/flutter_foreground_task/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442854,"owners_count":22071878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","background-service","flutter","foreground-notification","foreground-service","ios"],"created_at":"2024-09-24T13:45:21.010Z","updated_at":"2025-05-16T00:07:17.659Z","avatar_url":"https://github.com/Dev-hwang.png","language":"Dart","readme":"This plugin is used to implement a foreground service on the Android platform.\n\n\u003cp\u003e\n\u003ca href=\"https://pub.dev/packages/flutter_foreground_task\"\u003e\u003cimg src=\"https://img.shields.io/pub/v/flutter_foreground_task.svg\" alt=\"pub\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Dev-hwang/flutter_foreground_task/actions\"\u003e\u003cimg src=\"https://github.com/Dev-hwang/flutter_foreground_task/workflows/master/badge.svg\" alt=\"build\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-orange.svg\" alt=\"MIT license\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n* Can perform repetitive tasks with the foreground service.\n* Supports two-way communication between the foreground service and UI(main isolate).\n* Provides a widget that minimize the app without closing it when the user presses the soft back button.\n* Provides useful utilities that can use while performing tasks.\n* Provides an option to automatically resume the foreground service on boot.\n\n## Support version\n\n- Flutter: `3.10.0+`\n- Dart: `3.0.0+`\n- Android: `5.0+ (minSdkVersion: 21)`\n- iOS: `12.0+`\n\n## Getting started\n\nTo use this plugin, add `flutter_foreground_task` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/). For example:\n\n```yaml\ndependencies:\n  flutter_foreground_task: ^8.17.0\n```\n\nAfter adding the plugin to your flutter project, we need to declare the platform-specific permissions ans service to use for this plugin to work properly.\n\n### :baby_chick: Android\n\nOpen the `AndroidManifest.xml` file and declare the service tag inside the `\u003capplication\u003e` tag as follows.\n\nIf you want the foreground service to run only when the app is running, add `android:stopWithTask=\"true\"`.\n\nAs mentioned in the Android guidelines, to start a FG service on Android 14+, you must declare `android:foregroundServiceType`.\n\n* [`camera`](https://developer.android.com/about/versions/14/changes/fgs-types-required#camera)\n* [`connectedDevice`](https://developer.android.com/about/versions/14/changes/fgs-types-required#connected-device)\n* [`dataSync`](https://developer.android.com/about/versions/14/changes/fgs-types-required#data-sync)\n* [`health`](https://developer.android.com/about/versions/14/changes/fgs-types-required#health)\n* [`location`](https://developer.android.com/about/versions/14/changes/fgs-types-required#location)\n* [`mediaPlayback`](https://developer.android.com/about/versions/14/changes/fgs-types-required#media)\n* [`mediaProjection`](https://developer.android.com/about/versions/14/changes/fgs-types-required#media-projection)\n* [`microphone`](https://developer.android.com/about/versions/14/changes/fgs-types-required#microphone)\n* [`phoneCall`](https://developer.android.com/about/versions/14/changes/fgs-types-required#phone-call)\n* [`remoteMessaging`](https://developer.android.com/about/versions/14/changes/fgs-types-required#remote-messaging)\n* [`shortService`](https://developer.android.com/about/versions/14/changes/fgs-types-required#short-service)\n* [`specialUse`](https://developer.android.com/about/versions/14/changes/fgs-types-required#special-use)\n* [`systemExempted`](https://developer.android.com/about/versions/14/changes/fgs-types-required#system-exempted)\n\n```\n\u003c!-- required --\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" /\u003e\n\n\u003c!-- foregroundServiceType: dataSync --\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE_DATA_SYNC\" /\u003e\n\n\u003c!-- foregroundServiceType: remoteMessaging --\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING\" /\u003e\n\n\u003c!-- Warning: Do not change service name. --\u003e\n\u003cservice \n    android:name=\"com.pravera.flutter_foreground_task.service.ForegroundService\"\n    android:foregroundServiceType=\"dataSync|remoteMessaging\"\n    android:exported=\"false\" /\u003e\n```\n\nCheck runtime requirements before starting the service. If this requirement is not met, the foreground service cannot be started.\n\n\u003cimg src=\"https://github.com/Dev-hwang/flutter_foreground_task/assets/47127353/2a35dada-2c82-41f4-8a45-56776c88e9d3\" width=\"700\"\u003e\n\n### :baby_chick: iOS\n\nYou can also run `flutter_foreground_task` on the iOS platform. However, it has the following limitations.\n\n* If you force close an app in recent apps, the task will be destroyed immediately.\n* The task cannot be started automatically on boot like Android OS.\n* The task runs in the background for approximately 30 seconds every 15 minutes. This may take longer than 15 minutes due to iOS limitations.\n\n**Info.plist**:\n\nAdd the key below to `ios/Runner/info.plist` file so that the task can run in the background.\n\n```text\n\u003ckey\u003eBGTaskSchedulerPermittedIdentifiers\u003c/key\u003e\n\u003carray\u003e\n    \u003cstring\u003ecom.pravera.flutter_foreground_task.refresh\u003c/string\u003e\n\u003c/array\u003e\n\u003ckey\u003eUIBackgroundModes\u003c/key\u003e\n\u003carray\u003e\n    \u003cstring\u003efetch\u003c/string\u003e\n\u003c/array\u003e\n```\n\n**Objective-C**:\n\nTo use this plugin developed in Swift in a project using Objective-C, you need to add a bridge header.\nIf there is no `ios/Runner/Runner-Bridging-Header.h` file in your project, check this [page](https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_objective-c_into_swift).\n\nOpen the `ios/Runner/AppDelegate.swift` file and add the commented code.\n\n```objc\n#import \"AppDelegate.h\"\n#import \"GeneratedPluginRegistrant.h\"\n\n// this\n#import \u003cflutter_foreground_task/FlutterForegroundTaskPlugin.h\u003e\n\n// this\nvoid registerPlugins(NSObject\u003cFlutterPluginRegistry\u003e* registry) {\n  [GeneratedPluginRegistrant registerWithRegistry:registry];\n}\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application\n    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n  [GeneratedPluginRegistrant registerWithRegistry:self];\n\n  // this\n  [FlutterForegroundTaskPlugin setPluginRegistrantCallback:registerPlugins];\n  if (@available(iOS 10.0, *)) {\n    [UNUserNotificationCenter currentNotificationCenter].delegate = (id\u003cUNUserNotificationCenterDelegate\u003e) self;\n  }\n\n  return [super application:application didFinishLaunchingWithOptions:launchOptions];\n}\n\n@end\n```\n\n**Swift**:\n\nDeclare the import statement below in the `ios/Runner/Runner-Bridging-Header.h` file.\n\n```objc\n#import \u003cflutter_foreground_task/FlutterForegroundTaskPlugin.h\u003e\n```\n\nOpen the `ios/Runner/AppDelegate.swift` file and add the commented code.\n\n```swift\nimport UIKit\nimport Flutter\n\n@main\n@objc class AppDelegate: FlutterAppDelegate {\n  override func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n  ) -\u003e Bool {\n    GeneratedPluginRegistrant.register(with: self)\n\n    // this\n    SwiftFlutterForegroundTaskPlugin.setPluginRegistrantCallback { registry in\n      GeneratedPluginRegistrant.register(with: registry)\n    }\n    if #available(iOS 10.0, *) {\n      UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate\n    }\n\n    return super.application(application, didFinishLaunchingWithOptions: launchOptions)\n  }\n}\n```\n\n## How to use\n\n### :hatched_chick: step by step\n\n1. Initialize port for communication between TaskHandler and UI.\n\n```dart\nvoid main() {\n  // Initialize port for communication between TaskHandler and UI.\n  FlutterForegroundTask.initCommunicationPort();\n  runApp(const ExampleApp());\n}\n```\n\n2. Write a `TaskHandler` and a `callback` to request starting a TaskHandler.\n\n```dart\n// The callback function should always be a top-level or static function.\n@pragma('vm:entry-point')\nvoid startCallback() {\n  FlutterForegroundTask.setTaskHandler(MyTaskHandler());\n}\n\nclass MyTaskHandler extends TaskHandler {\n  // Called when the task is started.\n  @override\n  Future\u003cvoid\u003e onStart(DateTime timestamp, TaskStarter starter) async {\n    print('onStart(starter: ${starter.name})');\n  }\n\n  // Called based on the eventAction set in ForegroundTaskOptions.\n  @override\n  void onRepeatEvent(DateTime timestamp) {\n    // Send data to main isolate.\n    final Map\u003cString, dynamic\u003e data = {\n      \"timestampMillis\": timestamp.millisecondsSinceEpoch,\n    };\n    FlutterForegroundTask.sendDataToMain(data);\n  }\n\n  // Called when the task is destroyed.\n  @override\n  Future\u003cvoid\u003e onDestroy(DateTime timestamp) async {\n    print('onDestroy');\n  }\n\n  // Called when data is sent using `FlutterForegroundTask.sendDataToTask`.\n  @override\n  void onReceiveData(Object data) {\n    print('onReceiveData: $data');\n  }\n\n  // Called when the notification button is pressed.\n  @override\n  void onNotificationButtonPressed(String id) {\n    print('onNotificationButtonPressed: $id');\n  }\n\n  // Called when the notification itself is pressed.\n  @override\n  void onNotificationPressed() {\n    print('onNotificationPressed');\n  }\n\n  // Called when the notification itself is dismissed.\n  @override\n  void onNotificationDismissed() {\n    print('onNotificationDismissed');\n  }\n}\n```\n\n3. Add a callback to receive data sent from the TaskHandler. If the screen or controller is disposed, be sure to call the `removeTaskDataCallback` function.\n\n```dart\nvoid _onReceiveTaskData(Object data) {\n  if (data is Map\u003cString, dynamic\u003e) {\n    final dynamic timestampMillis = data[\"timestampMillis\"];\n    if (timestampMillis != null) {\n      final DateTime timestamp =\n          DateTime.fromMillisecondsSinceEpoch(timestampMillis, isUtc: true);\n      print('timestamp: ${timestamp.toString()}');\n    }\n  }\n}\n\n@override\nvoid initState() {\n  super.initState();\n  // Add a callback to receive data sent from the TaskHandler.\n  FlutterForegroundTask.addTaskDataCallback(_onReceiveTaskData);\n}\n\n@override\nvoid dispose() {\n  // Remove a callback to receive data sent from the TaskHandler.\n  FlutterForegroundTask.removeTaskDataCallback(_onReceiveTaskData);\n  super.dispose();\n}\n```\n\n4. Request permissions and initialize the service.\n\n```dart\nFuture\u003cvoid\u003e _requestPermissions() async {\n  // Android 13+, you need to allow notification permission to display foreground service notification.\n  //\n  // iOS: If you need notification, ask for permission.\n  final NotificationPermission notificationPermission =\n      await FlutterForegroundTask.checkNotificationPermission();\n  if (notificationPermission != NotificationPermission.granted) {\n    await FlutterForegroundTask.requestNotificationPermission();\n  }\n\n  if (Platform.isAndroid) {\n    // Android 12+, there are restrictions on starting a foreground service.\n    //\n    // To restart the service on device reboot or unexpected problem, you need to allow below permission.\n    if (!await FlutterForegroundTask.isIgnoringBatteryOptimizations) {\n      // This function requires `android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS` permission.\n      await FlutterForegroundTask.requestIgnoreBatteryOptimization();\n    }\n\n    // Use this utility only if you provide services that require long-term survival,\n    // such as exact alarm service, healthcare service, or Bluetooth communication.\n    //\n    // This utility requires the \"android.permission.SCHEDULE_EXACT_ALARM\" permission.\n    // Using this permission may make app distribution difficult due to Google policy.\n    if (!await FlutterForegroundTask.canScheduleExactAlarms) {\n      // When you call this function, will be gone to the settings page. \n      // So you need to explain to the user why set it.\n      await FlutterForegroundTask.openAlarmsAndRemindersSettings();\n    }\n  }\n}\n\nvoid _initService() {\n  FlutterForegroundTask.init(\n    androidNotificationOptions: AndroidNotificationOptions(\n      channelId: 'foreground_service',\n      channelName: 'Foreground Service Notification',\n      channelDescription:\n          'This notification appears when the foreground service is running.',\n      onlyAlertOnce: true,\n    ),\n    iosNotificationOptions: const IOSNotificationOptions(\n      showNotification: false,\n      playSound: false,\n    ),\n    foregroundTaskOptions: ForegroundTaskOptions(\n      eventAction: ForegroundTaskEventAction.repeat(5000),\n      autoRunOnBoot: true,\n      autoRunOnMyPackageReplaced: true,\n      allowWakeLock: true,\n      allowWifiLock: true,\n    ),\n  );\n}\n\n@override\nvoid initState() {\n  super.initState();\n  // Add a callback to receive data sent from the TaskHandler.\n  FlutterForegroundTask.addTaskDataCallback(_onReceiveTaskData);\n\n  WidgetsBinding.instance.addPostFrameCallback((_) {\n    // Request permissions and initialize the service.\n    _requestPermissions();\n    _initService();\n  });\n}\n```\n\n5. Use `FlutterForegroundTask.startService` to start the service. `startService` provides the following options:\n* `serviceId`: The unique ID that identifies the service.\n* `notificationTitle`: The title to display in the notification.\n* `notificationText`: The text to display in the notification.\n* `notificationIcon`: The icon to display in the notification. Go to [this page](./documentation/customize_notification_icon.md) to customize.\n* `notificationButtons`: The buttons to display in the notification. (can add 0~3 buttons)\n* `notificationInitialRoute`: Initial route to be used when the app is launched via a notification. Works the same as the `launchApp` utility.\n* `callback`: A top-level function that calls the setTaskHandler function.\n\n```dart\nFuture\u003cServiceRequestResult\u003e _startService() async {\n  if (await FlutterForegroundTask.isRunningService) {\n    return FlutterForegroundTask.restartService();\n  } else {\n    return FlutterForegroundTask.startService(\n      serviceId: 256,\n      notificationTitle: 'Foreground Service is running',\n      notificationText: 'Tap to return to the app',\n      notificationIcon: null,\n      notificationButtons: [\n        const NotificationButton(id: 'btn_hello', text: 'hello'),\n      ],\n      notificationInitialRoute: '/',\n      callback: startCallback,\n    );\n  }\n}\n```\n\n\u003e [!NOTE]\n\u003e iOS Platform, `notificationButtons` is not displayed directly in notification.\n\u003e When the user slides down the notification, the button is displayed, so you need to guide the user on how to use it.\n\u003e https://developer.apple.com/documentation/usernotifications/declaring-your-actionable-notification-types\n\n6. Use `FlutterForegroundTask.updateService` to update the service. The options are the same as the start function.\n\n```dart\nfinal ForegroundTaskOptions defaultTaskOptions = ForegroundTaskOptions(\n  eventAction: ForegroundTaskEventAction.repeat(5000),\n  autoRunOnBoot: true,\n  autoRunOnMyPackageReplaced: true,\n  allowWakeLock: true,\n  allowWifiLock: true,\n);\n\n@pragma('vm:entry-point')\nvoid startCallback() {\n  FlutterForegroundTask.setTaskHandler(FirstTaskHandler());\n}\n\nclass FirstTaskHandler extends TaskHandler {\n  int _count = 0;\n\n  @override\n  Future\u003cvoid\u003e onStart(DateTime timestamp, TaskStarter starter) async {\n    // some code\n  }\n\n  @override\n  void onRepeatEvent(DateTime timestamp) {\n    _count++;\n    \n    if (_count == 10) {\n      FlutterForegroundTask.updateService(\n        foregroundTaskOptions: defaultTaskOptions.copyWith(\n          eventAction: ForegroundTaskEventAction.repeat(1000),\n        ),\n        callback: updateCallback,\n      );\n      return;\n    }\n    \n    FlutterForegroundTask.updateService(\n      notificationTitle: 'Hello FirstTaskHandler :)',\n      notificationText: timestamp.toString(),\n    );\n\n    // Send data to main isolate.\n    final Map\u003cString, dynamic\u003e data = {\n      \"timestampMillis\": timestamp.millisecondsSinceEpoch,\n    };\n    FlutterForegroundTask.sendDataToMain(data);\n  }\n\n  @override\n  Future\u003cvoid\u003e onDestroy(DateTime timestamp) async {\n    // some code\n  }\n}\n\n@pragma('vm:entry-point')\nvoid updateCallback() {\n  FlutterForegroundTask.setTaskHandler(SecondTaskHandler());\n}\n\nclass SecondTaskHandler extends TaskHandler {\n  @override\n  Future\u003cvoid\u003e onStart(DateTime timestamp, TaskStarter starter) async {\n    // some code\n  }\n\n  @override\n  void onRepeatEvent(DateTime timestamp) {\n    FlutterForegroundTask.updateService(\n      notificationTitle: 'Hello SecondTaskHandler :)',\n      notificationText: timestamp.toString(),\n    );\n\n    // Send data to main isolate.\n    final Map\u003cString, dynamic\u003e data = {\n      \"timestampMillis\": timestamp.millisecondsSinceEpoch,\n    };\n    FlutterForegroundTask.sendDataToMain(data);\n  }\n\n  @override\n  Future\u003cvoid\u003e onDestroy(DateTime timestamp) async {\n    // some code\n  }\n}\n```\n\n7. If you no longer use the service, call `FlutterForegroundTask.stopService`.\n\n```dart\nFuture\u003cServiceRequestResult\u003e _stopService() {\n  return FlutterForegroundTask.stopService();\n}\n```\n\n### :hatched_chick: deepening\n\nThis plugin supports two-way communication between TaskHandler and UI(main isolate).\n\nThe send function can only send primitive type(int, double, bool), String, Collection(Map, List) provided by Flutter.\n\nIf you want to send a custom object, send it in String format using jsonEncode and jsonDecode.\n\nJSON and serialization \u003e\u003e https://docs.flutter.dev/data-and-backend/serialization/json\n\n```dart\n// TaskHandler\n@override\nFuture\u003cvoid\u003e onStart(DateTime timestamp, TaskStarter starter) async {\n  // TaskHandler -\u003e Main(UI)\n  FlutterForegroundTask.sendDataToMain(Object);\n}\n\n// Main(UI)\nvoid _onReceiveTaskData(Object data) {\n  print('onReceiveTaskData: $data');\n}\n```\n\n```dart\n// Main(UI)\nvoid _sendDataToTask() {\n  // Main(UI) -\u003e TaskHandler\n  //\n  // The Map collection can only be sent in json format, such as Map\u003cString, dynamic\u003e.\n  FlutterForegroundTask.sendDataToTask(Object);\n}\n\n// TaskHandler\n@override\nvoid onReceiveData(Object data) {\n  print('onReceiveData: $data');\n\n  // You can cast it to any type you want using the Collection.cast\u003cT\u003e function.\n  if (data is List\u003cdynamic\u003e) {\n    final List\u003cint\u003e intList = data.cast\u003cint\u003e();\n  }\n}\n```\n\nAnd there are some functions for storing and managing data that are only used in this plugin.\n\n```dart\nvoid function() async {\n  await FlutterForegroundTask.getData(key: String);\n  await FlutterForegroundTask.getAllData();\n  await FlutterForegroundTask.saveData(key: String, value: Object);\n  await FlutterForegroundTask.removeData(key: String);\n  await FlutterForegroundTask.clearAllData();\n}\n```\n\nIf the plugin you want to use provides a stream, use it like this:\n\n```dart\nclass MyTaskHandler extends TaskHandler {\n  StreamSubscription\u003cLocation\u003e? _streamSubscription;\n\n  @override\n  Future\u003cvoid\u003e onStart(DateTime timestamp, TaskStarter starter) async {\n    _streamSubscription = FlLocation.getLocationStream().listen((location) {\n      final String message = '${location.latitude}, ${location.longitude}';\n      FlutterForegroundTask.updateService(notificationText: message);\n\n      // Send data to main isolate.\n      final String locationJson = jsonEncode(location.toJson());\n      FlutterForegroundTask.sendDataToMain(locationJson);\n    });\n  }\n\n  @override\n  void onRepeatEvent(DateTime timestamp) {\n    // not use\n  }\n\n  @override\n  Future\u003cvoid\u003e onDestroy(DateTime timestamp) async {\n    _streamSubscription?.cancel();\n    _streamSubscription = null;\n  }\n}\n```\n\n### :hatched_chick: other example\n\n#### [`internal_plugin_service`](https://github.com/Dev-hwang/flutter_foreground_task_example/tree/main/internal_plugin_service)\nAn example of using the platform channel in project with `flutter_foreground_task`.\n\n#### [`location_service`](https://github.com/Dev-hwang/flutter_foreground_task_example/tree/main/location_service)\nAn example of a background location service implementation using `flutter_foreground_task` and `fl_location`.\n\n#### [`record_service`](https://github.com/Dev-hwang/flutter_foreground_task_example/tree/main/record_service)\nAn example of a voice record service implementation using `flutter_foreground_task` and `record`.\n\n#### [`geofencing_service`](https://github.com/Dev-hwang/flutter_foreground_task_example/tree/main/geofencing_service)\nAn example of a background geofencing service implementation using `flutter_foreground_task` and `geofencing_api`.\n\n#### [`pedometer_service`](https://github.com/Dev-hwang/flutter_foreground_task_example/tree/main/pedometer_service)\nAn example of a pedometer service implementation using `flutter_foreground_task` and `pedometer`.\n\n## More Documentation\n\nGo [here](./documentation/models_documentation.md) to learn about the `models` provided by this plugin.\n\nGo [here](./documentation/utility_documentation.md) to learn about the `utility` provided by this plugin.\n\nGo [here](./documentation/migration_documentation.md) to `migrate` to the new version.\n\n## Support\n\nIf you find any bugs or issues while using the plugin, please register an issues on [GitHub](https://github.com/Dev-hwang/flutter_foreground_task/issues). You can also contact us at \u003chwj930513@naver.com\u003e.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-hwang%2Fflutter_foreground_task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-hwang%2Fflutter_foreground_task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-hwang%2Fflutter_foreground_task/lists"}