직접 테스트 해보진 않았으나 API 문서로는 CameraManager를 통해 알 수 있는 것 같습니다.
원문 : http://developer.android.com/reference/android/hardware/camera2/CameraManager.html#registerAvailabilityCallback(android.hardware.camera2.CameraManager.AvailabilityCallback, android.os.Handler)
Register a callback to be notified about camera device availability.
Registering the same callback again will replace the handler with the new one provided.
The first time a callback is registered, it is immediately called with the availability status of all currently known camera devices.
Since this callback will be registered with the camera service, remember to unregister it once it is no longer needed; otherwise the callback will continue to receive events indefinitely and it may prevent other resources from being released. Specifically, the callbacks will be invoked independently of the general activity lifecycle and independently of the state of individual CameraManager instances.
Parameters
callback |
the new callback to send camera availability notices to |
handler |
The handler on which the callback should be invoked, or null to use the current thread's looper . |
callback으로 사용가능하다면 onCameraAvailable이 사용 불가하다면 onCameraUnavailable이 호출 될 겁니다