Skip to content

This walkthrough builds the smallest useful Even Hub plugin: connect to the app bridge, render a text page on the glasses, then run it in the simulator or on hardware using QR sideloading.

Initialize the SDK

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

// Recommended: async wait — resolves when the bridge is ready
const bridge = await waitForEvenAppBridge()

// Alternative: synchronous singleton — only after bridge is initialized
const bridge = EvenAppBridge.getInstance()

Create a Page

Display a simple text screen on the glasses:

typescript
import {
  waitForEvenAppBridge,
  TextContainerProperty,
  CreateStartUpPageContainer,
} from '@evenrealities/even_hub_sdk'

const bridge = await waitForEvenAppBridge()

const mainText = new TextContainerProperty({
  xPosition: 0,
  yPosition: 0,
  width: 576,
  height: 288,
  borderWidth: 0,
  borderColor: 5,
  paddingLength: 4,
  containerID: 1,
  containerName: 'main',
  content: 'Hello from G2!',
  isEventCapture: 1,
})

const result = await bridge.createStartUpPageContainer(
  new CreateStartUpPageContainer({
    containerTotalNum: 1,
    textObject: [mainText],
  }),
)
// result: 0 = success, 1 = invalid, 2 = oversize, 3 = out of memory

Run It

With the Simulator

bash
evenhub-simulator http://localhost:5173

No hardware needed — the simulator renders the glasses display on your screen.

On Real Hardware

Generate a QR code pointing to your local dev server:

bash
evenhub qr --url "http://192.168.1.100:5173"

Scan it with the Even Realities App on your phone. Your app loads on the glasses with hot reload support.

Next Steps