com.iristick.smartglass.support.camera2
Class CameraManager.AvailabilityCallback¶
- java.lang.Object
-
- com.iristick.smartglass.support.camera2.CameraManager.AvailabilityCallback
- Enclosing class:
- CameraManager
public abstract static class CameraManager.AvailabilityCallback extends Object
A callback for camera devices becoming available or unavailable to open.
Cameras become available when they are no longer in use, or when a new removable camera is connected. They become unavailable when some application or service starts using a camera, or when a removable camera is disconnected.
Extend this callback and pass an instance of the subclass to
CameraManager.registerAvailabilityCallback(com.iristick.smartglass.support.camera2.CameraManager.AvailabilityCallback, android.os.Handler)
to be notified of such availability
changes.
Constructor Summary¶
Constructor and Description |
---|
AvailabilityCallback() |
Method Summary¶
Modifier and Type | Method and Description |
---|---|
void |
onCameraAvailable(String cameraId)
A new camera has become available to use.
|
void |
onCameraUnavailable(String cameraId)
A previously-available camera has become unavailable for use.
|
Methods inherited from class java.lang.Object¶
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail¶
AvailabilityCallback¶
public AvailabilityCallback()
Method Detail¶
onCameraAvailable¶
public void onCameraAvailable(String cameraId)
A new camera has become available to use.
The default implementation of this method does nothing.
- Parameters:
cameraId
- The unique identifier of the new camera.
onCameraUnavailable¶
public void onCameraUnavailable(String cameraId)
A previously-available camera has become unavailable for use.
If an application had an active CameraDevice instance for the
now-disconnected camera, that application will receive a
disconnection error
.
The default implementation of this method does nothing.
- Parameters:
cameraId
- The unique identifier of the disconnected camera.