Skip to content

Last updated: 2026-11-10

Once the glasses are ready, your app can open an EvenHub page on the display. The display is 576 x 288 pixels. The SDK owns the page: it creates it, keeps it alive with a heartbeat every 5 seconds, matches every reply from the glasses and closes it. Your app sends page content and listens to evenHub events.

The page model is the same one Even Hub apps use. See Display & UI System for how containers, event capture and the canvas work. This page uses the Flutter API. For Kotlin and Swift, see Native Android and iOS.

Text page ​

For a short message, open a single text page:

dart
await sdk.openEvenHubTextPage(text: 'Hello from your app');
// Later:
await sdk.closeEvenHub();

The text must be 1 to 64 bytes of UTF-8. The page receives input, and the method returns once the request is submitted. The glasses have created the page when an evenHub event arrives with phase == 'active'.

Commands ​

For anything larger, use executeEvenHubCommand. It waits for the glasses to answer and returns the result as a map. A command that fails throws a PlatformException.

dart
await sdk.executeEvenHubCommand(EvenHubCommand.createPage, parameters: {
  'textObjects': [
    {
      'containerId': 1,
      'containerName': 'message',
      'width': 528,
      'height': 240,
      'xPosition': 24,
      'yPosition': 24,
      'isEventCapture': true,
      'content': 'Hello EvenHub',
    }
  ],
});

await sdk.executeEvenHubCommand(EvenHubCommand.updateText, parameters: {
  'containerId': 1,
  'containerName': 'message',
  'content': 'Updated text',
});

await sdk.executeEvenHubCommand(EvenHubCommand.shutdownPage);
  • createPage: opens a page and starts the heartbeat. Takes the page fields and an optional widgetId.
  • rebuildPage: replaces the containers and menu of the open page. Takes the page fields.
  • updateText: replaces the text of a text container. Takes containerId, containerName, content (up to 1999 bytes) and an optional textColor 0-4.
  • updateImage: sends a whole image to an image container. Takes containerId, containerName, data and compressMode 0-2. See Images.
  • shutdownPage: closes the page. Takes exitMode 0 or 1; 1 asks the wearer to confirm.
  • audioControl: turns the glasses microphone on or off. Takes enabled. See Microphone audio.
  • imuControl: turns motion data on or off. Takes enabled and reportFrequency 100-1000.
  • menuStartupFailed: tells the glasses your app could not start from the menu. Takes errorCode and errorString.
  • menuSubitemResponse: answers a menu sub-item switch. Takes parentItemId, subItemId and status.
  • heartbeat: the SDK sends it for you.

The SDK fills in session IDs, container counts, image chunking and heartbeat counters. Passing any of them, or any unknown key, is rejected.

Page fields ​

createPage and rebuildPage take these lists, with at most 12 containers in total:

FieldUp toEach item
textObjects8Container fields plus content (up to 999 bytes) and textColor 0-4
listObjects4Container fields plus itemContainer: itemNames (1-20 items, up to 63 bytes each), itemWidth, isItemSelectBorderEnabled
imageObjects4Container fields; width 20-288 and height 20-144
menu1items: 1-10 menu items

Every container takes:

FieldValue
containerIdRequired, a non-zero number unique across the page
containerNameRequired, 1-15 bytes
width, heightRequired, 1-576 and 1-288
xPosition, yPosition0-576 and 0-288, default 0
zOrderIndexOptional
borderWidth 0-5, borderColor 0-15, borderRadius 0-10, paddingLength 0-32Text and list containers, default 0
isEventCaptureText and list containers; at most one per page

A menu item has itemName (1-31 bytes), a non-zero itemId, position 0-10, checkedIndex and up to 5 subItems, each with its own itemName and itemId.

Images ​

updateImage takes the whole image as data, up to 1 MB, already encoded in the glasses' image format for the compressMode you pass. The SDK splits it into chunks and confirms each one. It does not convert PNG or BMP files.

Microphone audio ​

After both sides are ready and the page is active, turn on the glasses microphone:

dart
await sdk.executeEvenHubCommand(EvenHubCommand.audioControl, parameters: {'enabled': true});

Audio starts once the firmware acknowledges the command. At least one connected side must support the glasses' audio stream. The audio arrives as evenHub events with event == 'audioEvent':

  • audioPcm: the audio as a Uint8List, decoded by the native SDK into signed 16-bit little-endian PCM.
  • sampleRate 16000, channels 1 and bitsPerSample 16.
  • source: glasses.
  • speakerRole: self, other or unknown.
  • direction: a signed number, when the firmware provides one.

Turn the microphone off with {'enabled': false}. Closing the page or disconnecting also stops the audio.

Closing a page ​

shutdownPage with exitMode: 0, or closeEvenHub(), closes the page at once. With exitMode: 1 the glasses ask the wearer to confirm: the result carries awaitingExit: true, and the page stays open until the wearer exits.

When the wearer switches a menu sub-item, answer with menuSubitemResponse within 10 seconds. menuStartupFailed works as soon as the glasses are ready, with or without a page. Both complete once the SDK has queued them; the glasses do not acknowledge them.

Page events ​

evenHub events report the page in phase:

phaseMeaning
openingPage requested
activeThe glasses created the page
heartbeatThe glasses confirmed a heartbeat; heartbeatCount counts them
inputThe wearer did something; the action is in event
closingClose requested
closedThe page is closed
failedThe page failed; the reason is in failure

A failure of busy means the SDK did not accept the request. The page that was already open stays open.

Input in event:

eventWearer action
click, doubleClickTap or double tap
scrollUp, scrollDownSwipe
longPress, longPressReleaseLong press starts and ends
foregroundEnter, foregroundExitThe page comes to the front or leaves it
exit, abnormalExitThe page exits

details carries the rest: kind (list, text or system), the containerId and containerName of the container that received the input, selectedItemName and selectedItemIndex for lists, source (leftGlasses, rightGlasses or ring) for system input, x, y and z for motion data, and the item IDs for menu clicks and sub-item switches.