Navigation

Agent.Accessibility. Navigation

Identify the connectivity state of a connected Accessibility Navigation device and listen to the keypress events.

Note: This driver implements the Standard Driver Interface.

Methods

(async) getConnectionState() → {Promise.<Boolean>}

Returns a boolean value informing if the Navigation device is connected

Example
// Initialise the Agent
...
await window.Agent.onReadyAsync();
const {Accessibility} = window.Agent;
const isConnected = await Accessibility.Navigation.getConnectionState();

console.log(`The Navigation device ${isConnected ? 'is' : 'is not'} connected`)

(async) isHeadPhoneConnected() → {Promise.<Boolean>}

Returns a boolean value informing if the Headphones are connected

onConnected(cb)

Register an event handler for the onConnected event

Parameters:
Name Type Description
cb function

The callback to call

onDisconnected(cb)

Register an event handler for the onDisconnected event

Parameters:
Name Type Description
cb function

The callback to call

onDownArrow(cb)

Register an event handler for the onDownArrow event

Parameters:
Name Type Description
cb function

The callback to call

onEnter(cb)

Register an event handler for the onEnter event

Parameters:
Name Type Description
cb function

The callback to call

onHeadphoneInserted(cb)

Register an event handler for the onHeadphoneInserted event

Parameters:
Name Type Description
cb function

The callback to call

onHeadphoneRemoved(cb)

Register an event handler for the onHeadphoneRemoved event

Parameters:
Name Type Description
cb function

The callback to call

onLeftArrow(cb)

Register an event handler for the onLeftArrow event

Parameters:
Name Type Description
cb function

The callback to call

onRightArrow(cb)

Register an event handler for the onRightArrow event

Parameters:
Name Type Description
cb function

The callback to call

onUpArrow(cb)

Register an event handler for the onUpArrow event

Parameters:
Name Type Description
cb function

The callback to call

onVolume(cb)

Register an event handler for the onVolume event

Parameters:
Name Type Description
cb function

The callback to call