https://github.com/nicosnicolaou16/sampleforegroundservice
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/sampleforegroundservice
android android-app android-application article background-service compose foreground-service jetpack-android jetpack-compose jetpackcompose kotlin kotlin-android location-services service
Last synced: 7 months 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.
- Host: GitHub
- URL: https://github.com/nicosnicolaou16/sampleforegroundservice
- Owner: NicosNicolaou16
- Created: 2023-11-25T19:43:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-24T23:42:33.000Z (10 months ago)
- Last Synced: 2025-03-23T06:41:23.628Z (7 months ago)
- Topics: android, android-app, android-application, article, background-service, compose, foreground-service, jetpack-android, jetpack-compose, jetpackcompose, kotlin, kotlin-android, location-services, service
- Language: Kotlin
- Homepage: https://medium.com/@nicosnicolaou/foreground-service-in-android-9ff18be69ef6
- Size: 179 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample Foreground Service
This sample project demonstrates the setup for a foreground service. The service in this project is
used to request location updates. The required permission, ``, depends on the type of foreground service.# 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 (Dart Language) :point_right: [SampleForegroundServiceFlutter](https://github.com/NicosNicolaou16/SampleForegroundServiceFlutter) :point_left:# Versioning
Target SDK version: 35
Minimum SDK version: 29
Kotlin version: 2.1.20
Gradle version: 8.9.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