ServiceInfo.ForegroundServiceTypeCamera 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 camera in the android.R.attr#foregroundServiceType attribute.

[Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_CAMERA", ApiSince=30)]
[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 ForegroundServiceTypeCamera = 64;
[<Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_CAMERA", ApiSince=30)>]
[<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 ForegroundServiceTypeCamera : Android.Content.PM.ForegroundService

Field Value

Value = 64

Implements

Attributes

Remarks

Constant corresponding to camera in the android.R.attr#foregroundServiceType attribute. Use the camera device or record video. For apps with targetSdkVersionandroid.os.Build.VERSION_CODES#R and above, a foreground service will not be able to access the camera if this type is not specified in the manifest and in android.app.Service#startForeground(int, android.app.Notification, int).

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_CAMERA and android.Manifest.permission#CAMERA.

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

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