public interface

CameraManagerCompat.CameraManagerCompatImpl

 androidx.camera.camera2.internal.compat.CameraManagerCompat.CameraManagerCompatImpl

Overview

Provides backwards compatibility to CameraManager features.

Summary

Methods
public static CameraManagerCompat.CameraManagerCompatImplfrom(Context context, Handler compatHandler)

Returns a CameraManagerCompat.CameraManagerCompatImpl instance depending on the API level

public CameraCharacteristicsgetCameraCharacteristics(java.lang.String cameraId)

public java.lang.StringgetCameraIdList()

Return the list of currently connected camera devices by identifier, including cameras that may be in use by other camera API clients.

public CameraManagergetCameraManager()

public java.util.Set<java.util.Set>getConcurrentCameraIds()

Return the set of concurrent camera id set which could operate concurrently.

public voidopenCamera(java.lang.String cameraId, java.util.concurrent.Executor executor, CameraDevice.StateCallback callback)

public voidregisterAvailabilityCallback(java.util.concurrent.Executor executor, CameraManager.AvailabilityCallback callback)

public voidunregisterAvailabilityCallback(CameraManager.AvailabilityCallback callback)

Methods

public java.lang.String getCameraIdList()

Return the list of currently connected camera devices by identifier, including cameras that may be in use by other camera API clients.

public java.util.Set<java.util.Set> getConcurrentCameraIds()

Return the set of concurrent camera id set which could operate concurrently.

public void registerAvailabilityCallback(java.util.concurrent.Executor executor, CameraManager.AvailabilityCallback callback)

public void unregisterAvailabilityCallback(CameraManager.AvailabilityCallback callback)

public CameraCharacteristics getCameraCharacteristics(java.lang.String cameraId)

public void openCamera(java.lang.String cameraId, java.util.concurrent.Executor executor, CameraDevice.StateCallback callback)

public CameraManager getCameraManager()

public static CameraManagerCompat.CameraManagerCompatImpl from(Context context, Handler compatHandler)

Returns a CameraManagerCompat.CameraManagerCompatImpl instance depending on the API level

Parameters:

context: Context used to retrieve the CameraManager.
compatHandler: Handler used for all APIs taking an java.util.concurrent.Executor argument on lower API levels. If the API level does not support directly executing on an Executor, it will first be posted to this handler and the executor will be called from there.