Foreground service types (Android 14)
Every foreground service must declare a purpose and hold the matching permission.
In one line
Can run long Android background tasks, but only for a declared purpose with a notification
Every foreground service must declare a purpose and hold the matching permission.
Forces apps to state why they keep running (location, camera, media, phone call). The type decides which hardware and permissions the service can use, so it shows purpose to reviewers.
What it can and can't do
What the user does: You start something long, like playing music, tracking a run, or syncing a big file
It can
- Keep playing audio, tracking location or syncing data while the screen is off
- Show you a notification that says the work is running
- Use the camera, microphone or location in the background, but only after you allowed each one
It cannot
- Start a background service from nowhere without a notification
- Use the microphone, camera or location without their own permission
- Pick any purpose it likes; Android 14 makes each service declare one type and checks it
- Match this on iPhone, where background modes need an Apple approved setting instead
How it differs between platforms: Android uses service types with a visible notification. iPhone uses background modes set up in Xcode.
On Android and iPhone
| Android | iPhone | |
|---|---|---|
| Status | Supported | Partial |
| First version | Android 14 (API 34) | iOS 4.0 |
| Permission or entitlement | FOREGROUND_SERVICE_<TYPE> permissions such as _LOCATION, _CAMERA, _MICROPHONE, _DATA_SYNC, _MEDIA_PLAYBACK, _CONNECTED_DEVICE, _PHONE_CALL, _SPECIAL_USE | UIBackgroundModes |
| Protection level | normal | entitlement |
| How access is granted | install | entitlement |
| What the user sees | Notification required; microphone, camera, location need their own runtime grant while in use | None |
| How long it lasts | While the service runs | Per mode; app suspended when work ends |
| How to take it back | Task manager | Remove capability |
| Store policy | Play: FGS type declaration form for apps targeting 34 | App Review 2.5.4 |
| API | android:foregroundServiceType, startForeground(id, notification, type) | UIBackgroundModes: audio, location, voip, bluetooth-central, bluetooth-peripheral, fetch, remote-notification, processing, external-accessory, nearby-interaction |
| Notes | Types: camera, connectedDevice, dataSync, health, location, mediaPlayback, mediaProjection, microphone, phoneCall, remoteMessaging, shortService, specialUse, systemExempted; mediaProcessing added in 15 | See mob.bg.ios-modes |
Data you get
What comes back: Service type
Shape: enum
How often: Per service
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
type | enum | None | about 14 types | Not listed |
Technical limits
- Type must match actual use
- Play review for sensitive types
The story
What it is
Android makes every always-running app task state its purpose, like navigation or music.
For you
You see this as a persistent notification, such as a music player or a navigation arrow. It tells you an app is allowed to keep working while you do something else.
For makers
Makers must pick the right label and get the matching permission. Google and reviewers use the label to check an app is not hiding battery heavy work behind a vague reason.
Where you see it
| Type | Example | Apps |
|---|---|---|
| maps | A navigation app keeps turn by turn guidance running with the screen off using the location type. | Google Maps, Waze |
| music | A streaming app keeps playing with the phone locked using the media playback type. | Spotify, YouTube Music |
| rideshare | A driver app keeps sharing live position during a trip while you check messages in another app. | Uber, Lyft |
| fitness | A cycling app records your route and heart rate through the whole ride using location and health types. | Strava, Komoot |
| messaging | A calling app keeps your microphone live during a voice call after you leave the app. | WhatsApp, Signal |
| games | A cloud gaming or remote play app keeps its stream alive while you answer a text. | Xbox Cloud Gaming |
Risks
- Apps can misuse loose labels like special use
- Always-on notification can be ignored
Android and iPhone in short
- Android: Required from Android 14. Each type needs its own permission, and camera, mic and location still need your tap.
- iPhone: iOS uses background modes in Xcode instead, which are reviewed by Apple.
What the platform says
- Google: Foreground service types. Android 14 requires apps to declare why a service keeps running, such as media playback or location.
Good uses and abuse
Legitimate uses
- Navigation
- Media
Known abuse
- Using a loose type like specialUse to stay alive
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 1 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2023-10, Android 14 (API 34): Foreground service type and matching permission mandatory
- 2024-10, Android 15 (API 35): mediaProcessing type added; BOOT_COMPLETED receivers cannot start dataSync, camera, mediaPlayback, phoneCall, mediaProjection or microphone FGS
Related capabilities
Related
- Foreground service timeouts (Android 15). Can keep some Android services running, but only about 6 hours in 24
- Background start restrictions. Can't freely start work or open screens from the background
- Ongoing and foreground service notifications. Can show a notification you cannot easily swipe away while background work runs
Sources
How well checked: Based on official documentation.