We are making the following changes to foreground service types with Android 15.
Media processing
- Foreground service type to declare in manifest under
android:foregroundServiceType
mediaProcessing
- Permission to declare in your manifest
FOREGROUND_SERVICE_MEDIA_PROCESSING
- Constant to pass to
startForeground()
FOREGROUND_SERVICE_TYPE_MEDIA_PROCESSING
- Runtime prerequisites
- None
- Description
Service for performing time-consuming operations on media assets, like converting media to different formats. The system allows this service a limited time to run; under normal circumstances, this time limit would be 6 hours.
Your app should manually stop the media processing service in the following scenario:
- When the transcoding operation finishes or reaches a failure state, have the
service call
Service.stopForeground()
andService.stopSelf()
to stop the service completely.
- When the transcoding operation finishes or reaches a failure state, have the
service call
Camera
Apps that target Android 15 or higher are not allowed to launch a
camera foreground service from a BOOT_COMPLETED
broadcast receiver.
For more information, see
Restrictions on BOOT_COMPLETED
broadcast receivers launching foreground
services.
Data sync
Apps that target Android 15 or higher are not allowed to launch a
data sync foreground service from a BOOT_COMPLETED
broadcast receiver.
For more information, see
Restrictions on BOOT_COMPLETED
broadcast receivers launching foreground
services.
Media playback
Apps that target Android 15 or higher are not allowed to launch a
media playback foreground service from a BOOT_COMPLETED
broadcast receiver.
For more information, see
Restrictions on BOOT_COMPLETED
broadcast receivers launching foreground
services.
Media projection
Apps that target Android 15 or higher are not allowed to launch a
media projection foreground service from a BOOT_COMPLETED
broadcast receiver.
For more information, see
Restrictions on BOOT_COMPLETED
broadcast receivers launching foreground
services.
Microphone
Apps that target Android 14 (API level 34) or higher are not allowed to launch a
microphone foreground service from a BOOT_COMPLETED
broadcast receiver.
For more information, see
Restrictions on BOOT_COMPLETED
broadcast receivers launching foreground
services.
Phone call
Apps that target Android 15 or higher are not allowed to launch a
phone call foreground service from a BOOT_COMPLETED
broadcast receiver.
For more information, see
Restrictions on BOOT_COMPLETED
broadcast receivers launching foreground
services.