Compartir a través de


ServiceInfo.ForegroundServiceTypeMediaPlayback Campo

Definición

Precaución

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

Constante correspondiente a mediaPlayback en el android.R.attr#foregroundServiceType atributo .

[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

Valor de campo

Value = 2

Implementaciones

Atributos

Comentarios

Constante correspondiente a mediaPlayback en el android.R.attr#foregroundServiceType atributo . Música, vídeo, noticias u otra reproducción multimedia.

Al iniciar el servicio en primer plano con este tipo desde aplicaciones destinadas al nivel android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE de API y versiones posteriores, se requerirá el permiso android.Manifest.permission#FOREGROUND_SERVICE_MEDIA_PLAYBACK.

Documentación de Java para android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK.

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el proyecto de código abierto de Android y se usan según los términos descritos en la licencia de atribución de Creative Commons 2.5.

Se aplica a