Partager via


ServiceInfo.ForegroundServiceTypeMediaPlayback Champ

Définition

Attention

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

Constante correspondant à mediaPlayback l’attribut 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

Valeur de champ

Value = 2

Implémente

Attributs

Remarques

Constante correspondant à mediaPlayback l’attribut android.R.attr#foregroundServiceType . Musique, vidéo, actualités ou autre lecture multimédia.

Le démarrage du service de premier plan avec ce type à partir d’applications ciblant le niveau android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE d’API et versions ultérieures nécessite une autorisation android.Manifest.permission#FOREGROUND_SERVICE_MEDIA_PLAYBACK.

Documentation Java pour android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK.

Les parties de cette page sont des modifications basées sur le travail créé et partagé par le projet Android Open Source et utilisés en fonction des termes décrits dans la licence d’attribution Creative Commons 2.5.

S’applique à