Foreground service
Lets the app run long tasks with a visible notification.
In one line
Can run long tasks on Android with a visible notification, but only for a stated purpose
Lets the app run long tasks with a visible notification.
A visible, user-aware background task such as navigation or a call. Types and time limits keep abuse in check.
What it can and can't do
What the user does: You start something long, like a download, a workout or a file sync
It can
- Keep a long task going while the app is closed, with a notification showing
- Declare a type such as media, location or data sync, as Android 14 requires
- Use a new user started task on iPhone in iOS 26
It cannot
- Run a data sync or media processing service past about 6 hours in 24 on Android 15
- Start one from the background in many cases; Android restricts that
- Run freely on iPhone, which allows only set background modes
How it differs between platforms: Android has foreground services with a notification. iPhone limits background work to set modes, plus user started processing in iOS 26.
On Android and iPhone
| Android | iPhone | |
|---|---|---|
| Status | Supported | Partial |
| First version | Android 9 (API 28) | iOS 13 |
| Permission or entitlement | FOREGROUND_SERVICE plus FOREGROUND_SERVICE_<TYPE> (API 34) | UIBackgroundModes, BGTaskScheduler, ActivityKit |
| Protection level | normal | none |
| How access is granted | install | none |
| What the user sees | None; notification shown | None |
| How long it lasts | Not revocable; user can stop from Task Manager | n/a |
| How to take it back | Settings > Task Manager or notification | n/a |
| Store policy | Play: Foreground service types declaration required for apps targeting 14+; April 2026 preview removes geofencing as approved use effective Aug 26, 2026 | App Review 2.5.4: background modes only for relevant features |
| API | Service.startForeground with type | BGTaskScheduler, BGContinuedProcessingTask (iOS 26), Live Activities |
| Notes | Android 14 requires a type; Android 15 dataSync and mediaProcessing limited to about 6 hours in 24; starting from background restricted since Android 12. | iOS limits background execution to defined modes; iOS 26 adds user-initiated continued processing. |
Data you get
What comes back: Foreground service run
Shape: event
How often: duration
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
timeout | integer | hours | 6 for dataSync | per 24 hours |
Technical limits
- Visible notification required
- Types gate use cases
The story
What it is
Lets an app run a long task in the background while showing a visible notification.
For you
You see a notification while an app is doing something long, like navigating or recording. It is the sign the app is allowed to keep going.
For makers
Makers use it for calls, navigation and fitness. Android requires a type and limits time so it is not a hiding place.
Where you see it
| Type | Example | Apps |
|---|---|---|
| maps | A navigation app keeps giving directions with the screen off. | Google Maps, Waze |
| fitness | A run tracker keeps recording your route while you check messages. | Strava |
| messaging | A call keeps going after you leave the app. | |
| music | A player keeps playing in your pocket. | Spotify |
| games | A game download or a cloud stream continues while you do something else. | Xbox Cloud Gaming |
| smart-home | A security app keeps a camera feed ready for alerts. | None named |
| media | A screen recorder keeps capturing a live stream. | None named |
Risks
- Can hide long running work
- Battery drain
Android and iPhone in short
- Android: Android 14 needs a type. Android 15 limits data sync to about 6 hours in 24.
- iPhone: iOS only allows background modes. iOS 26 adds user started continued processing.
What the platform says
- Google: Foreground services. Google describes foreground services as work the user is aware of, shown with a notification.
Good uses and abuse
Legitimate uses
- Navigation
- Calls
- Fitness
Known abuse
- Hidden persistence
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 |
A real example: LinkedIn
Exodus snippets show FOREGROUND_SERVICE (4.1.637) and FOREGROUND_SERVICE_MICROPHONE (4.1.995) in the LinkedIn manifest. What feature drives it is not documented; voice recording in messages is the likely driver (inferred).
History
- 2021-10, Android 12 (API 31): Foreground services cannot be started from background with exceptions
- 2023-10, Android 14 (API 34): Foreground service types and matching permissions required
- 2023-10, Android 14 (API 34): Typed foreground services required with matching permission
- 2024-09, Android 15 (API 35): Time limits for dataSync and mediaProcessing
Related capabilities
Related
- Wake lock. Can keep your phone's processor awake on Android, or the screen on iPhone
- Run at startup. Can start itself in the background after your Android phone restarts
- Microphone. Can listen through your microphone while in use, after you tap Allow
Sources
- Android: Foreground service types
- Android 14 behavior changes (all apps)
- Android 15 behavior changes (all apps)
- Exodus Privacy report, com.linkedin.android 4.1.995 (Oct 2024)
How well checked: Based on official documentation.