Share via


Camera.IAutoFocusCallback.OnAutoFocus(Boolean, Camera) Method

Definition

Caution

deprecated

Called when the camera auto focus completes.

[Android.Runtime.Register("onAutoFocus", "(ZLandroid/hardware/Camera;)V", "GetOnAutoFocus_ZLandroid_hardware_Camera_Handler:Android.Hardware.Camera/IAutoFocusCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[System.Obsolete("deprecated")]
public void OnAutoFocus (bool success, Android.Hardware.Camera? camera);
[<Android.Runtime.Register("onAutoFocus", "(ZLandroid/hardware/Camera;)V", "GetOnAutoFocus_ZLandroid_hardware_Camera_Handler:Android.Hardware.Camera/IAutoFocusCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<System.Obsolete("deprecated")>]
abstract member OnAutoFocus : bool * Android.Hardware.Camera -> unit

Parameters

success
Boolean

true if focus was successful, false if otherwise

camera
Camera

the Camera service object

Attributes

Remarks

Called when the camera auto focus completes. If the camera does not support auto-focus and autoFocus is called, onAutoFocus will be called immediately with a fake value of success set to true.

The auto-focus routine does not lock auto-exposure and auto-white balance after it completes.

Java documentation for android.hardware.Camera.AutoFocusCallback.onAutoFocus(boolean, android.hardware.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

See also