Skip to content

Audio

typescript
// Start/stop microphone capture
await bridge.audioControl(true) // start
await bridge.audioControl(false) // stop

Audio data arrives via audioEvent in the event callback. Format: PCM 16kHz, signed 16-bit little-endian, mono.

IMU

The G2 glasses contain an IMU (inertial measurement unit). Use imuControl to start and stop motion data streaming.

typescript
import { waitForEvenAppBridge, ImuReportPace, OsEventTypeList } from '@evenrealities/even_hub_sdk'

const bridge = await waitForEvenAppBridge()

// Start IMU reporting
await bridge.imuControl(true, ImuReportPace.P500)

// Listen for IMU data
const unsubscribe = bridge.onEvenHubEvent(event => {
  const sys = event.sysEvent
  if (!sys?.imuData) return
  if (sys.eventType !== OsEventTypeList.IMU_DATA_REPORT) return

  const { x, y, z } = sys.imuData
  console.log('IMU:', x, y, z)
})

// Stop IMU reporting
await bridge.imuControl(false)
unsubscribe()

imuControl(isOpen, reportFrq)

ParameterTypeDescription
isOpenbooleantrue to start, false to stop
reportFrqImuReportPacePacing code for report frequency (optional when stopping — defaults to P100)

ImuReportPace

The reportFrq parameter accepts one of the following pacing codes:

ValueConstant
100ImuReportPace.P100
200ImuReportPace.P200
300ImuReportPace.P300
400ImuReportPace.P400
500ImuReportPace.P500
600ImuReportPace.P600
700ImuReportPace.P700
800ImuReportPace.P800
900ImuReportPace.P900
1000ImuReportPace.P1000

These are protocol pacing codes, not literal Hz values.

IMU Data Shape

IMU samples arrive as Sys_ItemEvent through the sysEvent field of onEvenHubEvent. Each sample contains:

FieldTypeDescription
eventTypeOsEventTypeListIMU_DATA_REPORT for IMU samples
imuData.xfloatX-axis value
imuData.yfloatY-axis value
imuData.zfloatZ-axis value

The imuData field is an IMU_Report_Data protobuf message. Data pushes continuously after imuControl(true, ...) until stopped with imuControl(false).

Device Info

typescript
const info = await bridge.getDeviceInfo()
// Returns: model (G1/G2/Ring1), serial number, battery, wearing status, charging, in-case

Real-time monitoring:

typescript
bridge.onDeviceStatusChanged(status => {
  // Battery, wearing, charging updates
})

User Info

typescript
const user = await bridge.getUserInfo()
// Returns: uid, name, avatar, country

Local Storage

typescript
await bridge.setLocalStorage('key', 'value')
const value = await bridge.getLocalStorage('key')

OS Event Models

The SDK exposes the following models for OS→App events:

ModelDescription
Text_ItemEventText container event
List_ItemEventList container event
Sys_ItemEventSystem event — carries eventType, eventSource, imuData, systemExitReasonCode
IMU_Report_DataIMU sample payload (x, y, z floats) inside Sys_ItemEvent.imuData
OsEventTypeListEvent type enum — includes CLICK_EVENT, DOUBLE_CLICK_EVENT, SCROLL_TOP_EVENT, SCROLL_BOTTOM_EVENT, FOREGROUND_ENTER_EVENT, FOREGROUND_EXIT_EVENT, ABNORMAL_EXIT_EVENT, SYSTEM_EXIT_EVENT, IMU_DATA_REPORT
ImuCtrlCmd / ImuCtrlCmdResponseProtobuf command/response maps used internally by imuControl

SDK Reference Documentation

For the full API surface — including all method signatures, parameter types, return values, and event payloads — refer to the official SDK package documentation:

npm: @evenrealities/even_hub_sdk

The SDK TypeScript definitions (*.d.ts files) in the package serve as the authoritative reference for all available methods and types.

What the SDK Does NOT Expose

No direct Bluetooth access, no arbitrary pixel drawing, no audio output, no text alignment, no font control, no background colors, no per-item list styling, no programmatic scroll position, no animations, no camera (there is none), and images are greyscale only.