Skip to content

Choose an example

Choose an example by the capability you need. Run the original first, then copy and modify it.

Examples and entry points#

The following list groups examples by source-code purpose. To try existing examples, first check the dropdown names and combinations in “Run an existing example”. You do not need to create hello-web first.

ObjectiveGlasses directoryWeb directory
First glasses gameGlassSDK/examples/game/breakoutNot required
Basic Web displayGlassSDK/examples/web_bridgeFollow “Your first Web plugin” to create hello-web
Custom paired commandsGlassSDK/examples/display_control_labPhoneSDK/examples/display-control-lab
Web capabilities such as storage, files, display, and recordingUse with GlassSDK/examples/web_bridgePhoneSDK/examples/permission-debug
Reading and more complex paired operationsGlassSDK/examples/novel_readerPhoneSDK/examples/novel-reader
Graphics implementation and extension queriesGlassSDK/examples/extension; see the SDK directory for other examplesNot required
Short recording and continuous audio streamGlassSDK/examples/audio_capture_labPhoneSDK/examples/audio-capture-lab; check the matching audio contract first
Transparent images and frame animationGlassSDK/examples/image_animationNot required

Checks when copying an example#

  1. Copy the entire example directory, including resources, vendor, protocol files, and manifest.
  2. Change manifest.id and name first. If a copied Web project retains the original ID, Studio's workspace scan deduplicates it and the new copy may not appear. Keep the identity and increase the version only when iterating on the same application. For paired examples, update the pairing declarations on both sides.
  3. Change one easily observable behavior, then rebuild following the tutorial.
  4. Check that the build outputs and source-build attachments were generated, then refresh Studio.

Reference files in the toolkit#

  • GlassSDK/README.md
  • PhoneSDK/README.md