Class: DeviceApi

DeviceApi()

Class representing the api for interacting with the wearable device. You should register your delegate functions by utilizing the provided method calls and passing your function as the sole argument. I.e. DeviceApi.onAudioLevelChanged(() => console.log('foo'));

Constructor

new DeviceApi()

Source:

Members

audioLevel

Returns the device audio level.
Source:

buttonInput

Returns the last device button input.
Source:

lowPower

Indicates whether or not the device is in a low power state.
Source:

mode

Returns the device mode.
Source:

touchpadInput

Returns the last device touchpad input.
Source:

wearerHeading

Returns the device wearer heading, a number from 0 to 359..
Source:

Methods

onAudioLevelChanged()

Registers a provided function to be called when the audio level changes.
Source:

onButtonInput()

Registers a provided function to be called when the button input changes. The function will be provided an array of strings indicating which buttons were pressed and a boolean which will be True if the buttons were held (as opposed to simply pressed). The buttons that can be pressed are: L1, L2, L3, R1, R2, R3.
Source:

onLowPowerChange()

Registers a provided function to be called when the low power status changes.
Source:

onModeChanged()

Registers a provided function to be called when the mode changes.
Source:

onTouchpadInput()

Registers a provided function to be called when the touchpad input changes. This will be called with two arguments. The first being a swipe direction such as 'left swipe', 'right swipe', or 'back and forth swipe'. The second argument will be a pad number to specify which pad on the glasses the action came from.
Source:

onWearerHeadingChanged()

Registers a provided function to be called when the wearer heading changes.
Source: