Skip to content
com.iristick.smartglass.core

Class IristickBinding


public abstract class IristickBinding
extends Object
This class represents the active connection to the Iristick Services. An instance is returned by IristickConnection.onIristickServiceInitialized(com.iristick.smartglass.core.IristickBinding).

Methods of this class allow to perform actions that are not linked to a particular headset.

Field Summary

Modifier and Type Field and Description
static int GLOBAL_STATE_CONNECTING
Iristick device connection in progress.
static int GLOBAL_STATE_DISCONNECTED
No Iristick device connected.
static int GLOBAL_STATE_FIRMWARE_SYNC_FAILED
Firmware synchronization failed.
static int GLOBAL_STATE_FIRMWARE_SYNC_IN_PROGRESS
Firmware synchronization in progress.
static int GLOBAL_STATE_HEADSET_CONNECTED
Headset connected.
static int GLOBAL_STATE_POCKET_CONNECTED
Pocket Unit connected.
static int GLOBAL_STATE_UNSUPPORTED_DEVICE
Unsupported Iristick device attached.

Constructor Summary

Constructor and Description
IristickBinding() 

Method Summary

Modifier and Type Method and Description
abstract void enterView(int viewId)
Deprecated. 
Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
abstract void enterView(View view)
Deprecated. 
Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
abstract void focusView(int viewId)
Deprecated. 
Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
abstract void focusView(View view)
Deprecated. 
Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
abstract int getGlobalState()
Gets the global state of the Iristick Services.
abstract void setInteractionRules(List<InteractionRule> rules)
Deprecated. 
Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

GLOBAL_STATE_DISCONNECTED

public static final int GLOBAL_STATE_DISCONNECTED
No Iristick device connected.

This constant is returned by getGlobalState() when no Iristick device is currently connected.

Since:
1.1
See Also:
getGlobalState()

GLOBAL_STATE_CONNECTING

public static final int GLOBAL_STATE_CONNECTING
Iristick device connection in progress.

This constant is returned by getGlobalState() when the Iristick Services are initializing a connected Iristick device.

Since:
1.1
See Also:
getGlobalState()

GLOBAL_STATE_POCKET_CONNECTED

public static final int GLOBAL_STATE_POCKET_CONNECTED
Pocket Unit connected.

This constant is returned by getGlobalState() when a pocket unit is connected and initialized, but no headset is attached.

Since:
1.1
See Also:
getGlobalState()

GLOBAL_STATE_HEADSET_CONNECTED

public static final int GLOBAL_STATE_HEADSET_CONNECTED
Headset connected.

This constant is returned by getGlobalState() when a headset is connected and initialized.

Since:
1.1
See Also:
getGlobalState()

GLOBAL_STATE_FIRMWARE_SYNC_IN_PROGRESS

public static final int GLOBAL_STATE_FIRMWARE_SYNC_IN_PROGRESS
Firmware synchronization in progress.

This constant is returned by getGlobalState() when an Iristick device is connected and firmware synchronization is in progress.

Since:
1.1
See Also:
getGlobalState()

GLOBAL_STATE_FIRMWARE_SYNC_FAILED

public static final int GLOBAL_STATE_FIRMWARE_SYNC_FAILED
Firmware synchronization failed.

This constant is returned by getGlobalState() when an Iristick device is connected, but the firmware synchronization could not be completed successfully.

Since:
1.1
See Also:
getGlobalState()

GLOBAL_STATE_UNSUPPORTED_DEVICE

public static final int GLOBAL_STATE_UNSUPPORTED_DEVICE
Unsupported Iristick device attached.

This constant is returned by getGlobalState() when an unsupported Iristick device is attached. For example this can happen if new hardware is connected to a phone running an old version of Iristick Services that do not support the new hardware.

Since:
1.1
See Also:
getGlobalState()

Constructor Detail

IristickBinding

public IristickBinding()

Method Detail

getGlobalState

@CheckResult
public abstract int getGlobalState()
Gets the global state of the Iristick Services.

Note

this method (as well as IristickConnection2.onGlobalStateChanged(int) may return a code that is not defined by a GLOBAL_STATE_* constant of this class. Your code must be able to handle such unknown state gracefully.

Returns:
A code indicating the global state of the Iristick Services.
Since:
1.1
See Also:
IristickConnection2.onGlobalStateChanged(int), GLOBAL_STATE_DISCONNECTED, GLOBAL_STATE_CONNECTING, GLOBAL_STATE_POCKET_CONNECTED, GLOBAL_STATE_HEADSET_CONNECTED, GLOBAL_STATE_FIRMWARE_SYNC_IN_PROGRESS, GLOBAL_STATE_FIRMWARE_SYNC_FAILED, GLOBAL_STATE_UNSUPPORTED_DEVICE

setInteractionRules

@Deprecated
public abstract void setInteractionRules(@Nullable
                                                     List<InteractionRule> rules)
Deprecated. Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
Configure the interaction behavior of the Iristick Services.

For each view in this application, the list of rules will be processed from first to last. Configuration options set on matching rules will be applied to the view, with options from later rules overriding options from earlier ones.

Calling this method clears any previously set rules.

Parameters:
rules - The ordered list of rules to obey, or null to clear all rules.
See Also:
InteractionRule.create()

focusView

@Deprecated
public abstract void focusView(@NonNull
                                           View view)
Deprecated. Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
Give interaction focus to the given view.

This method does a best-effort attempt to put the interaction focus on view. It may silently fail if the view could not be found or this app is not in the foreground.

Parameters:
view - The view to focus.

enterView

@Deprecated
public abstract void enterView(@NonNull
                                           View view)
Deprecated. Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
Give interaction focus to and enter the given view.

This method does a best-effort attempt to put the interaction focus on view. It may silently fail if the view could not be found or this app is not in the foreground.

Parameters:
view - The view to focus.

focusView

@Deprecated
public abstract void focusView(@IdRes
                                           int viewId)
Deprecated. Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
Give interaction focus to the view with the given resource ID.

This method does a best-effort attempt to put the interaction focus on view. It may silently fail if the view could not be found or this app is not in the foreground.

Parameters:
viewId - The resource ID of the view to focus.

enterView

@Deprecated
public abstract void enterView(@IdRes
                                           int viewId)
Deprecated. Relying on the Iristick Accessibility Service is not recommended. The accessibility service might be removed or become optional in a future release.
Give interaction focus to and enter the view with the given resource ID.

This method does a best-effort attempt to put the interaction focus on view. It may silently fail if the view could not be found or this app is not in the foreground.

Parameters:
viewId - The resource ID of the view to focus.