Android.Hardware.Camera2.CameraCaptureSession.Capture Method

Syntax

[Android.Runtime.Register("capture", "(Landroid/hardware/camera2/CaptureRequest;Landroid/hardware/camera2/CameraCaptureSession$CaptureCallback;Landroid/os/Handler;)I", "GetCapture_Landroid_hardware_camera2_CaptureRequest_Landroid_hardware_camera2_CameraCaptureSession_CaptureCallback_Landroid_os_Handler_Handler")]
public abstract int Capture (CaptureRequest request, CameraCaptureSession.CaptureCallback listener, Android.OS.Handler handler)

See Also

CameraCaptureSession.SetRepeatingRequest(CaptureRequest, .CaptureCallback, .CaptureCallback)
CameraCaptureSession.AbortCaptures

Parameters

request
the settings for this capture
listener
The callback object to notify once this request has been processed. If null, no metadata will be produced for this capture, although image data will still be produced.
handler
the handler on which the listener should be invoked, or null to use the current thread's Android.OS.Looper.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Android.Hardware.Camera2.CameraAccessExceptionif the camera device is no longer connected or has encountered a fatal error
Java.Lang.IllegalStateExceptionif this session is no longer active, either because the session was explicitly closed, a new session has been created or the camera device has been closed.
Java.Lang.IllegalArgumentExceptionif the request targets no Surfaces or Surfaces that are not configured as outputs for this session. Or if the handler is null, the listener is not null, and the calling thread has no looper.

Remarks

Submit a request for an image to be captured by the camera device.

The request defines all the parameters for capturing the single image, including sensor, lens, flash, and post-processing settings.

Each request will produce one Android.Hardware.Camera2.CaptureResult and produce new frames for one or more target Surfaces, set with the CaptureRequest builder's NoType:android/hardware/camera2/CaptureRequest$Builder;Href=../../../../reference/android/hardware/camera2/CaptureRequest.Builder.html#addTarget(android.view.Surface) method. The target surfaces (set with NoType:android/hardware/camera2/CaptureRequest$Builder;Href=../../../../reference/android/hardware/camera2/CaptureRequest.Builder.html#addTarget(android.view.Surface)) must be a subset of the surfaces provided when this capture session was created.

Multiple requests can be in progress at once. They are processed in first-in, first-out order, with minimal delays between each capture. Requests submitted through this method have higher priority than those submitted through CameraCaptureSession.SetRepeatingRequest(CaptureRequest, .CaptureCallback, .CaptureCallback) or CameraCaptureSession.setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler), and will be processed as soon as the current repeat/repeatBurst processing completes.

[Android Documentation]

Requirements

Namespace: Android.Hardware.Camera2
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0