CameraManager.TorchCallback.OnTorchModeUnavailable(String) Method

Definition

A camera's torch mode has become unavailable to set via #setTorchMode.

[Android.Runtime.Register("onTorchModeUnavailable", "(Ljava/lang/String;)V", "GetOnTorchModeUnavailable_Ljava_lang_String_Handler", ApiSince=23)]
public virtual void OnTorchModeUnavailable (string cameraId);
[<Android.Runtime.Register("onTorchModeUnavailable", "(Ljava/lang/String;)V", "GetOnTorchModeUnavailable_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member OnTorchModeUnavailable : string -> unit
override this.OnTorchModeUnavailable : string -> unit

Parameters

cameraId
String

The unique identifier of the camera whose torch mode has become unavailable.

Attributes

Remarks

A camera's torch mode has become unavailable to set via #setTorchMode.

If torch mode was previously turned on by calling #setTorchMode, it will be turned off before CameraManager.TorchCallback#onTorchModeUnavailable is invoked. #setTorchMode will fail until the torch mode has entered a disabled or enabled state again.

The default implementation of this method does nothing.

Java documentation for android.hardware.camera2.CameraManager.TorchCallback.onTorchModeUnavailable(java.lang.String).

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