Skip to Content
Platform.Ontology

Foreground service timeouts (Android 15)

Some foreground services now stop after 6 hours in 24, and can only restart after a user returns to the app.

Works without askingNotifications and backgroundAndroid background limitsAndroid and iPhoneIn the background

In one line

Can keep some Android services running, but only about 6 hours in 24

Some foreground services now stop after 6 hours in 24, and can only restart after a user returns to the app.

A hard cap on long background syncs and media processing. It limits always-running services; Android 17 adds memory and audio limits on top.

What it can and can't do

What the user does: Nothing. It happens when an app runs a long sync or media job in the background

It can

  • Keep a long sync or media job going for several hours at a stretch
  • Restart a stopped service once you open the app again
  • Use a short service for quick tasks, which gets about 3 minutes

It cannot

  • Run a data sync service past the daily limit without you opening the app
  • Keep working after the system calls time out; the app gets only a few seconds to stop
  • Do this on iPhone, which has no foreground services and suspends apps as soon as work ends

How it differs between platforms: Android 15 caps some long services. iPhone has no such service type and simply suspends apps when work ends.

On Android and iPhone

AndroidiPhone
StatusSupportedNot supported
First versionAndroid 15 (API 35)Not available
Permission or entitlementNot listedNot listed
Protection levelnonenone
How access is grantednonenot-exposed
What the user seesNoneNot listed
How long it lastsdataSync and mediaProcessing get 6 hours total per 24 h; timer resets when the app is brought to the foregroundNot listed
How to take it backn/aNot listed
Store policyNone listedNone listed
APIService.onTimeout(int, int); startForeground throws ForegroundServiceStartNotAllowedException when exhaustedNot listed
NotesService gets a few seconds after onTimeout to call stopSelf() or a RemoteServiceException is thrown; shortService limit about 3 miniOS has no foreground service; background modes have no fixed daily cap but suspension is immediate once work ends

Data you get

What comes back: Time budget
Shape: integer
How often: Per 24 h

FieldTypeUnitRangePrecision
dataSyncintegerhours6Not listed
mediaProcessingintegerhours6tracked separately
shortServiceintegerminutesabout 3approx

Technical limits

  • Applies to apps targeting 35 and above
  • Timer resets on foreground

The story

What it is

Android now stops some always-running background tasks after about 6 hours in a day.

For you

You never see it work. Your phone just stops apps from quietly running heavy tasks for hours, so your battery lasts longer. If an app was syncing a huge backup, it may pause until you open it again.

For makers

Makers must design long jobs to finish, save progress and resume. It forces them to move big uploads and media work to smarter tools instead of one endless service.

Where you see it

TypeExampleApps
mediaA video editor exporting a long 4K clip keeps going in the background, then must pause and resume if the export runs past the daily limit.CapCut, Google Photos
fitnessA running tracker that keeps a data sync service alive all day must now finish cleanly and restart when you next open it.Strava
gamesA big game download or patch in the background gets paused near the limit and resumes when you return to the game.Genshin Impact
productivityA cloud drive uploading thousands of photos overnight switches to scheduled jobs so it is not killed by the timeout.Google Drive, Dropbox
healthA health app that copies sensor data from a watch all day has to batch the data instead of running nonstop.None named
enterpriseA delivery company app that polled for new orders in the background now relies on push messages instead.None named

Risks

  • Background jobs can stop mid task
  • Sync may lag until you reopen the app

Android and iPhone in short

  • Android: Applies from Android 15. The app gets a few seconds to wrap up when the timer fires, or it crashes.
  • iPhone: iOS has no equivalent. Apps are simply put to sleep soon after their work ends.

What the platform says

Good uses and abuse

Legitimate uses

  • Limiting battery drain

Known abuse

  • None

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2024-10, Android 15 (API 35): 6 hour per 24 h timeout for dataSync and mediaProcessing (targetSdk 35)

Sources

How well checked: Checked against real behavior.

On this page