Language

CameraManager.AvailabilityCallback.OnCameraRemoved(String) Method

Definition

A camera device has been physically removed or is no longer available to the system.

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

Parameters

cameraId
String

The unique identifier of the camera that has been removed.

Attributes

Remarks

A camera device has been physically removed or is no longer available to the system.

This callback is invoked when a previously available camera, such as a removable external camera, is disconnected. The camera ID will no longer be included in the list returned by GetCameraIdList() and any attempt to open it will result in an IllegalArgumentException.

If an application has an active CameraDevice instance for the removed camera that the client did not close, OnDisconnected(CameraDevice) is called.

When a camera is removed, the notification for OnCameraUnavailable(String) is submitted for the given cameraId before the notification for this callback. An executor may invoke the callbacks in a different order.

Android reference for android.hardware.camera2.CameraManager.AvailabilityCallback.onCameraRemoved.

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