ServiceInfo.ForegroundServiceTypeMediaPlayback Field

Definition

Caution

This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.

Constant corresponding to mediaPlayback in the android.R.attr#foregroundServiceType attribute.

[Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK", ApiSince=29)]
[Android.Runtime.RequiresPermission("android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK")]
[System.Obsolete("This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.", true)]
public const Android.Content.PM.ForegroundService ForegroundServiceTypeMediaPlayback = 2;
[<Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK", ApiSince=29)>]
[<Android.Runtime.RequiresPermission("android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK")>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.", true)>]
val mutable ForegroundServiceTypeMediaPlayback : Android.Content.PM.ForegroundService

Field Value

Value = 2

Implements

Attributes

Remarks

Constant corresponding to mediaPlayback in the android.R.attr#foregroundServiceType attribute. Music, video, news or other media playback.

Starting foreground service with this type from apps targeting API level android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE and later, will require permission android.Manifest.permission#FOREGROUND_SERVICE_MEDIA_PLAYBACK.

Java documentation for android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to