Skip to content
com.iristick.smartglass.support.camera2

Interface CameraManager.HeadsetCallback

Enclosing class:
CameraManager

public static interface CameraManager.HeadsetCallback
A callback for Iristick Smartglass headsets connecting or disconnecting.

The headset connection relies on a service running in the background.

Whenever a headset is connected and the service is available, its cameras and torches become available. The registered AvailabilityCallbacks and TorchCallbacks will be notified after the HeadsetCallbacks.

If there is an error contacting the service, this error is reported instead.

Field Summary

Modifier and Type Field and Description
static int ERROR_DEPRECATED_SDK
Error code for onIristickServiceError(int) indicating the SDK used to build this app is not supported anymore by the Iristick Service.
static int ERROR_FUTURE_SDK
Error code for onIristickServiceError(int) indicating the SDK used to build this app is newer than what is supported by the Iristick Service.
static int ERROR_NOT_ALLOWED
Error code for onIristickServiceError(int) indicating this app is not allowed to use the Iristick service.
static int ERROR_NOT_INSTALLED
Deprecated. 
This constant is an alias for ERROR_NOT_INSTALLED_UNATTACHED.
static int ERROR_NOT_INSTALLED_ATTACHED
Error code for onIristickServiceError(int) indicating the Iristick Services are not installed and an Iristick device was detected.
static int ERROR_NOT_INSTALLED_UNATTACHED
Error code for onIristickServiceError(int) indicating the Iristick Services are not installed and no Iristick device was detected.
static int ERROR_UNKNOWN
Error code for onIristickServiceError(int) indicating an unknown error.

Method Summary

Modifier and Type Method and Description
void onHeadsetConnected(Headset headset)
Called when a connection to an Iristick headset has been established.
void onHeadsetDisconnected(Headset headset)
Called when the connection to an Iristick headset has been lost.
void onIristickServiceError(int error)
Called when the connection to an Iristick headset could not be established due to an error with the Iristick service.
void onIristickServiceInitialized(IristickBinding binding)
Called when the connection to Iristick service is established.

Field Detail

ERROR_UNKNOWN

static final int ERROR_UNKNOWN
Error code for onIristickServiceError(int) indicating an unknown error.

ERROR_NOT_INSTALLED

@Deprecated
static final int ERROR_NOT_INSTALLED
Deprecated. This constant is an alias for ERROR_NOT_INSTALLED_UNATTACHED.
Error code for onIristickServiceError(int) indicating the Iristick Services are not installed and no Iristick device was detected.
See Also:
ERROR_NOT_INSTALLED_UNATTACHED

ERROR_NOT_INSTALLED_UNATTACHED

static final int ERROR_NOT_INSTALLED_UNATTACHED
Error code for onIristickServiceError(int) indicating the Iristick Services are not installed and no Iristick device was detected.

The detection of Iristick devices when the Iristick Services are not installed is provided on a best-effort basis.

See Also:
ERROR_NOT_INSTALLED_ATTACHED

ERROR_NOT_ALLOWED

static final int ERROR_NOT_ALLOWED
Error code for onIristickServiceError(int) indicating this app is not allowed to use the Iristick service.

ERROR_FUTURE_SDK

static final int ERROR_FUTURE_SDK
Error code for onIristickServiceError(int) indicating the SDK used to build this app is newer than what is supported by the Iristick Service. The service should be updated.

ERROR_DEPRECATED_SDK

static final int ERROR_DEPRECATED_SDK
Error code for onIristickServiceError(int) indicating the SDK used to build this app is not supported anymore by the Iristick Service. Either the app must be rebuild with a newer SDK, or the service must be downgraded to an older version.

ERROR_NOT_INSTALLED_ATTACHED

static final int ERROR_NOT_INSTALLED_ATTACHED
Error code for onIristickServiceError(int) indicating the Iristick Services are not installed and an Iristick device was detected.

The detection of Iristick devices when the Iristick Services are not installed is provided on a best-effort basis.

See Also:
ERROR_NOT_INSTALLED_UNATTACHED

Method Detail

onHeadsetConnected

void onHeadsetConnected(Headset headset)

Called when a connection to an Iristick headset has been established.

Parameters:
headset - The newly connected headset.

onHeadsetDisconnected

void onHeadsetDisconnected(Headset headset)

Called when the connection to an Iristick headset has been lost.

Parameters:
headset - The headset whose connection has been lost. This object should not be used anymore.

onIristickServiceInitialized

void onIristickServiceInitialized(IristickBinding binding)
Called when the connection to Iristick service is established. This method is called after onHeadsetConnected(Headset), if a headset was attached before establishing connection to the service.
Parameters:
binding - A binding object that allows communication with the Iristick service.

onIristickServiceError

void onIristickServiceError(int error)
Called when the connection to an Iristick headset could not be established due to an error with the Iristick service.
Parameters:
error - An error code explaining what went wrong.
See Also:
ERROR_UNKNOWN, ERROR_NOT_INSTALLED_UNATTACHED, ERROR_NOT_ALLOWED, ERROR_FUTURE_SDK, ERROR_DEPRECATED_SDK, ERROR_NOT_INSTALLED_ATTACHED