Recommended Free Tools
Yes. An Android foreground service (FGS) must be promoted with a notification, even if the user denies notification permission. On Android 13 and later, denial hides FGS notices from the notification drawer but does not prevent the service from starting; the notices remain available in Task Manager. The required service type, permissions, launch eligibility, and runtime limits also depend on Android version, target SDK, and the work being done.
Why does a foreground service need a notification?
An FGS is for work that continues when the user is not directly interacting with the app but remains noticeable to them—for example, an ongoing task whose status or use of system resources should be disclosed. Android’s foreground-services overview explains that the status-bar notification makes users aware that an app is performing foreground work and consuming system resources.
Use an FGS only when the work warrants that user-visible notice. Android recommends choosing another background-work approach for tasks that are not important enough to merit even a minimum-priority notification.
What must the notification and promotion call include?
The documented launch pattern starts the service with Context.startForegroundService(), then promotes it from the service by calling ServiceCompat.startForeground(), ordinarily in onStartCommand(). The promotion call supplies a notification ID, a Notification object, and the applicable foreground-service type or types.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
- A real notification: Supply the notification when promoting the service; notification-permission denial does not remove this requirement.
- A positive ID: The ID must not be zero. Use an ID that identifies the service notification.
- At least low priority: Set notification priority to
PRIORITY_LOWor higher. If it is lower, Android adds a system message in the notification drawer alerting the user that the app is using an FGS. - The active service type: Pass the type or types that describe the work and match the service’s manifest declaration.
Do foreground services need POST_NOTIFICATIONS?
No. Android 13 (API 33) introduced the POST_NOTIFICATIONS runtime permission for non-exempt notifications, including FGS notifications, but an app does not need that permission in order to launch an FGS. The service still has to provide a notification when it is promoted.
If permission is granted, the FGS notification appears in the notification drawer. If the user denies permission, the FGS notice is not shown in the drawer, but it remains visible in Task Manager. That difference in presentation is not an exemption from the notification requirement.
Rank #2
Which manifest declarations and permissions are required?
Declare each foreground service in the app manifest with a <service> element and an android:foregroundServiceType value that describes its actual work. For apps targeting API 34 or higher, Android requires the service type declaration and the applicable type-specific permission, in addition to the base FOREGROUND_SERVICE permission. The app must also meet the type’s runtime prerequisites.
For example, camera work requires the base FOREGROUND_SERVICE permission, the FOREGROUND_SERVICE_CAMERA permission, and the applicable runtime camera permission. Declaring a type alone does not satisfy runtime prerequisites.
- If the service type is missing where required, promotion can fail with
MissingForegroundServiceTypeException. - If the type-specific permission or a runtime prerequisite is missing, promotion can fail with
SecurityException. - If a service legitimately performs multiple kinds of work, declare the applicable types and pass the active types when promoting it. The types passed to
startForeground()must be among those declared for the service.
How do Android version and target SDK change the rules?
The device’s Android version and the app’s target SDK both matter. The milestones below describe requirements documented by Android Developers; they are not a substitute for checking the current rules for the app’s actual service type and target.
| Platform or target milestone | Relevant foreground-service rule |
|---|---|
| Android 9 / target API 28 | The FOREGROUND_SERVICE permission is required. |
| Android 10 / target API 29 | Location foreground work requires the location service type. |
| Android 11 / target API 30 | Camera and microphone foreground work require their respective service types. |
| Android 12 / target API 31 | Apps targeting API 31 or higher generally cannot start an FGS while in the background, subject to documented exceptions. |
| Android 14 / target API 34 | Apps must declare each FGS type and request its type-specific permission; the system checks type runtime prerequisites when the service is promoted. |
| Android 15 / target API 35 | dataSync and mediaProcessing services have time limits. Certain FGS types cannot be launched from BOOT_COMPLETED, and the SYSTEM_ALERT_WINDOW background-start exception is narrower. |
| Android 16 / API 36 | Background jobs started by an FGS must observe their applicable runtime quotas, including jobs scheduled through JobScheduler, WorkManager, or DownloadManager. |
For a target API 31-or-higher app, a foreground-service notification does not make an otherwise ineligible background start valid. Check whether the app is allowed to start the service from its current state or qualifies for a documented exception.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What are the Android 15 time limits?
For apps targeting Android 15 or higher (target API 35 or higher), Android limits dataSync and mediaProcessing foreground services to six hours per type in a 24-hour period. The allowances are tracked separately for the two types; the six-hour figure is a platform limit, not a recommended service duration.
When a service reaches its limit, Android calls Service.onTimeout(). The service must stop in response; if it does not, the system can produce an application-not-responding (ANR) error.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Best Value
Why might an FGS notification be missing or trigger a warning?
- It is absent from the notification drawer: On Android 13 and later, check whether the user denied
POST_NOTIFICATIONS. FGS notices can still appear in Task Manager. - Android adds an FGS warning: Check that notification priority is
PRIORITY_LOWor higher. - Promotion throws an exception: Check that the service type is declared, the required base and type-specific permissions are present, the passed types match the manifest, and the type’s runtime prerequisites are satisfied.
- The service cannot start from the background: For apps targeting API 31 or higher, check the background-start restrictions and whether a documented exception applies.
- The service stops after extended operation: For target API 35 or higher, check the
dataSyncormediaProcessingtime allowance and handleonTimeout().
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




