Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nicosnicolaou16/sampleforegroundserviceflutter

This sample project demonstrates the setup for a foreground service. The service in this project is a foreground service used to request location. The required permissions depend on the type of foreground service.
https://github.com/nicosnicolaou16/sampleforegroundserviceflutter

android android-application background-service channels dart flutter flutter-apps foreground-service kotlin kotlin-android location-services service

Last synced: 24 days ago
JSON representation

This sample project demonstrates the setup for a foreground service. The service in this project is a foreground service used to request location. The required permissions depend on the type of foreground service.

Awesome Lists containing this project

README

        

# Sample Foreground Service Flutter

This sample project demonstrates the setup for a foreground service, specifically for requesting
location data. The permission `` depends on the type of foreground service being
used.

Communication between Android Native and Flutter is handled via a channel (refer to the
documentation for more details). If you need additional examples on using channels, please check my
repository for more information.
[ExampleChannelNativeAndroidWithCustomData](https://github.com/NicosNicolaou16/ExampleChannelNativeAndroidWithCustomData)

> [!IMPORTANT]
> NOTE: EXAMPLE FOR ANDROID ONLY.

# Setup

## Manifest Setup

```xml
















```

> [!IMPORTANT]
> Check my article for the setup :point_right: [Foreground Service in Android - Medium](https://medium.com/@nicosnicolaou/foreground-service-in-android-9ff18be69ef6) :point_left:

> [!IMPORTANT]
> Similar project with (Kotlin Language) :point_right: [SampleForegroundService](https://github.com/NicosNicolaou16/SampleForegroundService) :point_left:

## Versioning

Flutter SDK version: 3.27.1

Dart Version: 3.6.0

# References

https://developer.android.com/about/versions/14/changes/fgs-types-required

https://stackoverflow.com/questions/14385231/android-broadcastreceiver-auto-run-service-after-reboot-of-device

https://medium.com/@shreebhagwat94/flutter-platform-channel-46578d21e69

https://blog.devgenius.io/use-flutter-screens-in-native-android-app-share-data-among-them-d97d670807a6