com.iristick.smartglass.core
Interface IristickConnection¶
- All Known Implementing Classes:
- IristickConnection2
public interface IristickConnection
Interface for monitoring the connection of Iristick headsets.
Implementing this interface directly is no longer recommended for new applications.
Prefer extending the IristickConnection2
abstract class 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 Services. |
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.
- Since:
- 1.1
- 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 Services. Either the app must be rebuild with a newer
SDK, or the service must be downgraded to an older version.
In particular, this error code may be returned if this app has been build with a pre-release SDK, and the installed Iristick Services are more recent.
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.
- Since:
- 1.1
- See Also:
ERROR_NOT_INSTALLED_UNATTACHED
Method Detail¶
onHeadsetConnected¶
void onHeadsetConnected(@NonNull Headset headset)
Called when a connection to an Iristick headset has been established.
- Parameters:
headset
- The newly connected headset.
onHeadsetDisconnected¶
void onHeadsetDisconnected(@NonNull 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(@NonNull 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 providing access to the Iristick Services.
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