Skip to content

Last updated: 2026-12-05

An Even Hub app with Widgets can notify users when an event needs their attention, such as a parcel becoming ready for collection. Notifications are optional. Users can enable them without adding the Widget to the Dashboard.

The Even Realities App initiates notification requests on a separate schedule from Widget data. Each path has its own endpoint and interval; a failure in one does not block the other. Your backend decides which events to queue and retains them until acknowledged.

Choose when to notify ​

Use Widgets for information users check at their convenience. Return a notification when a change warrants their attention. Your backend owns event conditions and pending events; the App owns permission, polling, deduplication and delivery to the glasses.

How notifications are delivered ​

┌──────────────┐  HTTPS POST  ┌────────────┐  Bluetooth  ┌───────────┐
│ Backend      │ ◄─────────── │ Phone      │ ──────────► │ Even G2   │
│ Queued event │ ───────────► │ Validate   │             │ Pop-up    │
└──────────────┘              └────────────┘             └───────────┘
  1. The App sends a POST to notify.endpoint on the notify.interval schedule.
  2. Your backend processes acknowledgments in receivedIds, then returns at most one pending notification.
  3. The App validates the event, checks its ID and delivery conditions, and hands an eligible notification to the glasses.
  4. The next notification POST carries accepted IDs in receivedIds. Acknowledgment records App acceptance and handoff. Check the pop-up on the glasses separately.

Requires Even Realities App 2.5.0+, min_sdk_version 0.0.16+, and an installed Even Hub app with Widgets. QR preview cannot deliver notifications.

Declare the capability ​

Add this top-level fragment to the Widget manifest, keeping its existing data, layout, configuration, default data and bindings:

json
"notify": {
  "interval": 60,
  "endpoint": "https://api.example.com/notifications"
}

notify.interval is an integer in seconds. CLI packaging requires at least 60 seconds. notify.endpoint is a full URL with a hostname. Use HTTPS for release packages. Use a separate endpoint from data.endpoint, or route by method if Widget data uses GET and both requests share a URL.

The notification method and body are fixed. notify configures only the interval and endpoint. An invalid notify object rejects the entire Widget manifest. Validate the files in Widget preview before installing a package; installed declaration failures may show no error and leave the app absent from Widget and notification lists.

Use the Widget manifest example for the data request and its compatibility fields. Use notify for new manifests and leave out the legacy timer and endpoint_notif fields. Only responses from notify.endpoint can deliver a notification.

Identify the recipient ​

Use X-EvenHub-Recipient-Id to look up the recipient's queue. The App generates this opaque ID on the phone for the account, app and bound glasses. Treat it as a routing key and validate the account association separately.

To send notifications for a user in your system, collect a binding code in the Plugin settings page and map it into the Widget data request. When the user enables notifications for the installed app and has bound glasses, the App includes the same recipient ID in data and notification requests. Validate the code and update the user-to-recipient association on each data request that carries the ID.

If the Widget is already on the Dashboard, enabling notifications triggers a data request with the ID. If the Widget is off the Dashboard, the App makes a data request before the first notification poll to establish the association. It repeats this synchronization when mapped values change, the data endpoint or mapping changes, or the Widget is removed from the Dashboard. If synchronization fails, the App retries it while notification polling continues on its own schedule.

Turning notifications off and back on preserves the ID. Reinstalling the Even Hub app, reinstalling the Even Realities App, or changing phones, accounts or glasses produces a new ID. Expire abandoned queues on your backend. Earlier 2.5.0 test builds sent X-EvenHub-Device-SN; if you support them, prefer the recipient ID whenever both headers are present.

The App sends the notification endpoint this fixed request:

http
POST /notifications
Accept: application/json
Content-Type: application/json; charset=utf-8
X-EvenHub-Plugin-Version: 1.0.0
X-EvenHub-Recipient-Id: 3f9c2a7be1d04c58a6b0f4e2d917c83a

{"receivedIds":["delivery-122","delivery-123"]}

receivedIds is the only JSON body field: an array containing all pending acknowledgment IDs, up to 64. It is empty on the initial request. Parse the JSON body, process acknowledgments idempotently, then return the queue head without removing it. Remove events only when acknowledged or expired.

Mapped business parameters such as the binding code go in the Widget data request. Notification POSTs use the configured URL as written, including any query parameters already in the URL.

Describe one event ​

Return at most one notification from the notification endpoint:

json
{
  "notification": {
    "available": true,
    "id": "delivery-124",
    "title": "Delivery update",
    "description": "Your parcel is ready for collection."
  }
}

For no event, omit notification, return null, or use { "available": false }. When available is true, id and description must be non-blank strings. IDs are limited to 256 UTF-16 code units; short ASCII IDs are easiest to handle. Keep the same ID for retries of one event and use a new ID for each different event.

title is optional: absent, null or blank means no title; other non-string values invalidate the notification. Invalid notifications are discarded without acknowledgment. Widget data requests run independently. Fix invalid queue entries so they do not block later events.

The glasses use the Even Hub app name as the source and show the time the phone received the notification. The title and body are truncated to 100 and 1,000 characters, respectively. Widget notifications share a delivery queue, with at least three seconds between handoffs.

Permission and polling ​

Notifications start disabled. When the user first opens the installed Plugin page, the App asks once: Enable allows notifications; Not now or dismissing the prompt leaves them disabled. Later changes use Settings → General → Notifications → Glasses → Glasses notifications, then Sources → Plugins → your app.

Enable Display → Notification pop-ups on the same Glasses tab to see the pop-up. With this display switch off, the App can still accept, hand off and acknowledge the event.

The per-app choice is stored on that phone for each account. Reinstalling the Even Hub app resets it to disabled and triggers the prompt again. Turning off the global switch preserves individual app choices.

Notification polling requires login, bound glasses, valid required configuration and both notification switches enabled. It runs only for installed packages while the App remains running. Glasses connectivity affects delivery, not whether the App polls.

Each notification interval starts when the previous request finishes; requests for one app do not overlap. Widget refresh, settings changes and Dashboard placement do not trigger or reset notification polling. Switching permission off and on or updating the package respects the previous interval, with up to two seconds of scheduling tolerance. App restart can trigger an immediate first request.

Requests time out after 15 seconds and must return 2xx UTF-8 JSON within 256 KB. Redirects are not followed. Failures back off by ×2, ×4 and so on, up to 30 minutes, or the configured interval if longer. One successful request restores the normal interval. This behavior is independent of Dashboard placement and Widget data failures.

Acknowledgment and retries ​

If glasses are disconnected, updating firmware, or starting or running a Plugin experience, the App does not accept or acknowledge the event. Keep it queued for a later eligible request. Stale responses after account, glasses, permission or package changes are also discarded.

Once the App hands off an event, explicit glasses rejection or an unknown send result still counts as accepted. Deduplication remembers the most recent 256 IDs across App restarts. Records are scoped by account, development or release installation, app, glasses, recipient ID and notification endpoint (including its query). Changing the endpoint or recipient ID starts a new record. Updating the app with the same endpoint and recipient ID, or toggling notifications, preserves the record. Reinstalling the app creates a new recipient ID and starts a new record.

Accepted IDs remain in subsequent requests until a response succeeds with valid JSON. Up to 64 IDs can await acknowledgment; each notification POST carries all pending IDs in its JSON body. Repeated acknowledgments are normal. Backend acknowledgment must be idempotent.

Return Cache-Control: no-store and avoid redirects. Retain unacknowledged events with bounded queues and expiration appropriate to your use case.

Verify a first notification ​

  1. Validate the files with Widget preview, then package and install a Private build through Developer hub → In development. QR preview and its Dashboard Widget never send notification requests.
  2. Confirm the intended build is active. An installed Beta or store build of the same app takes precedence over the Private build.
  3. Log in, bind glasses and save required app settings. Enable Glasses notifications, the app's switch under Sources → Plugins, and Display → Notification pop-ups.
  4. Inspect backend logs for a POST to notify.endpoint with X-EvenHub-Recipient-Id and an initial {"receivedIds":[]} body. For account-specific notifications, also confirm the data endpoint received the same ID and associated it with your user. Queue a known event for that recipient.
  5. Check glasses display and the ID in the next notification POST separately. Remove the event when acknowledged; retrying the same ID must not display it again within the deduplication window.
  6. Test disabled permission, missing settings, disconnected glasses, an active Plugin experience, malformed content, lost responses and App restart. Verify that notifications continue without Dashboard placement and that failures in one endpoint do not block the other.

Prepare for release ​

Package notify with the Widget in the same .ehpk. Removing it removes notification capability from new manifests. Endpoint changes create a new acknowledgment scope, so review how your backend handles previously sent events.

Use the shared testing and submission flows. Portal review emails and Inbox messages remain separate from these notifications.