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.
| Objective | Glasses directory | Web directory |
|---|---|---|
| First glasses game | GlassSDK/examples/game/breakout | Not required |
| Basic Web display | GlassSDK/examples/web_bridge | Follow “Your first Web plugin” to create hello-web |
| Custom paired commands | GlassSDK/examples/display_control_lab | PhoneSDK/examples/display-control-lab |
| Web capabilities such as storage, files, display, and recording | Use with GlassSDK/examples/web_bridge | PhoneSDK/examples/permission-debug |
| Reading and more complex paired operations | GlassSDK/examples/novel_reader | PhoneSDK/examples/novel-reader |
| Graphics implementation and extension queries | GlassSDK/examples/extension; see the SDK directory for other examples | Not required |
| Short recording and continuous audio stream | GlassSDK/examples/audio_capture_lab | PhoneSDK/examples/audio-capture-lab; check the matching audio contract first |
| Transparent images and frame animation | GlassSDK/examples/image_animation | Not required |
Checks when copying an example#
- Copy the entire example directory, including resources, vendor, protocol files, and manifest.
- 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.
- Change one easily observable behavior, then rebuild following the tutorial.
- 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