Compartilhar via


ServiceInfo.ForegroundServiceTypeMediaPlayback Campo

Definição

Cuidado

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

Constante correspondente a mediaPlayback no atributo android.R.attr#foregroundServiceType .

[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 do campo

Value = 2

Implementações

Atributos

Comentários

Constante correspondente a mediaPlayback no atributo android.R.attr#foregroundServiceType . Reprodução de música, vídeo, notícias ou outras mídias.

Iniciar o serviço em primeiro plano com esse tipo a partir de aplicativos direcionados ao nível android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE de API e posteriores exigirá permissão android.Manifest.permission#FOREGROUND_SERVICE_MEDIA_PLAYBACK.

Documentação Java para android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK.

Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usado de acordo com os termos descritos na Creative Commons 2.5 Attribution License.

Aplica-se a