Camera.NumberOfCameras Property

Definition

Caution

deprecated

Returns the number of physical cameras available on this device.

[System.Obsolete("deprecated")]
public static int NumberOfCameras { [Android.Runtime.Register("getNumberOfCameras", "()I", "")] get; }
[<System.Obsolete("deprecated")>]
[<get: Android.Runtime.Register("getNumberOfCameras", "()I", "")>]
static member NumberOfCameras : int

Property Value

total number of accessible camera devices, or 0 if there are no cameras or an error was encountered enumerating them.

Attributes

Remarks

Returns the number of physical cameras available on this device. The return value of this method might change dynamically if the device supports external cameras and an external camera is connected or disconnected.

If there is a android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA logical multi-camera in the system, to maintain app backward compatibility, this method will only expose one camera per facing for all logical camera and physical camera groups. Use camera2 API to see all cameras.

Java documentation for android.hardware.Camera.getNumberOfCameras().

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