CameraManager.TorchCallback.OnTorchModeChanged(String, Boolean) Method

Definition

A camera's torch mode has become enabled or disabled and can be changed via #setTorchMode.

[Android.Runtime.Register("onTorchModeChanged", "(Ljava/lang/String;Z)V", "GetOnTorchModeChanged_Ljava_lang_String_ZHandler", ApiSince=23)]
public virtual void OnTorchModeChanged (string cameraId, bool enabled);
[<Android.Runtime.Register("onTorchModeChanged", "(Ljava/lang/String;Z)V", "GetOnTorchModeChanged_Ljava_lang_String_ZHandler", ApiSince=23)>]
abstract member OnTorchModeChanged : string * bool -> unit
override this.OnTorchModeChanged : string * bool -> unit

Parameters

cameraId
String

The unique identifier of the camera whose torch mode has been changed.

enabled
Boolean

The state that the torch mode of the camera has been changed to. true when the torch mode has become on and available to be turned off. false when the torch mode has becomes off and available to be turned on.

Attributes

Remarks

A camera's torch mode has become enabled or disabled and can be changed via #setTorchMode.

The default implementation of this method does nothing.

Java documentation for android.hardware.camera2.CameraManager.TorchCallback.onTorchModeChanged(java.lang.String, boolean).

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