As of March 15, 2023, we will no longer sell Glass Enterprise Edition. We will continue supporting Glass Enterprise Edition until September 15, 2023. This documentation has been archived and remains as a historical reference for developers who actively maintain apps built for Glass Enterprise Edition. For more information, visit the
Help Center.
Code samples
Stay organized with collections
Save and categorize content based on your preferences.
The following samples are available to help you build apps for Glass Enterprise Edition 2.
See Samples on GitHub
open_in_new
Card sample
The following sample demonstrates how to build a basic UI:
See the Card Sample
open_in_new
Camera2 sample
The following sample demonstrates how to take photos and videos with the
Camera2 API:
See the Camera2 Sample
open_in_new
Gallery sample
The following sample demonstrates how to browse and delete photos and videos:
See the Gallery Sample
open_in_new
QR code scanner sample
The following sample demonstrates how to scan QR codes with the camera. It uses
CameraX API and
ZXing library to do so.
See the QR Code Scanner Sample
open_in_new
Voice Recognition sample
The following sample app demonstrates the built-in voice recognition functionality.
See the Voice Recognition Sample
open_in_new
Notes sample
The following sample app demonstrates the built-in
voice commands functionality
and how to use it with the built-in
voice recognition functionality.
See the Notes Sample
open_in_new
Voice commands reloading sample
The following sample app demonstrates how to
reload voice commands
and how to enable
debug mode for
voice commands.
See the Voice Commands Reloading Sample
open_in_new
Gesture detector sample
Basic navigation on Glass Enterprise Edition 2 device consists of detecting and responding to
gesture events on the touchpad.
Inputs and sensors page contains more information about it. Review this sample for
implementation details.
See the Gesture Detector Sample
open_in_new
WebRTC sample
An example call center application that showcases video conferencing using
WebRTC
See the WebRTC Sample
open_in_new
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-12-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-12-05 UTC."],[[["\u003cp\u003eThis page provides a collection of code samples to help developers build apps for Glass Enterprise Edition 2.\u003c/p\u003e\n"],["\u003cp\u003eThe samples demonstrate key functionalities like using the Camera2 API, building basic UI, scanning QR codes, and leveraging voice recognition.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can explore samples for browsing and deleting media, implementing gesture navigation, and utilizing WebRTC for video conferencing.\u003c/p\u003e\n"],["\u003cp\u003eEach sample includes source code and documentation on GitHub, linked for easy access and integration into Glass Enterprise Edition 2 applications.\u003c/p\u003e\n"]]],[],null,["# Code samples\n\nThe following samples are available to help you build apps for Glass Enterprise Edition 2.\n\n[See Samples on GitHub\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples)\n\nCard sample\n-----------\n\nThe following sample demonstrates how to build a basic UI:\n\n[See the Card Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/CardSample)\n\nCamera2 sample\n--------------\n\nThe following sample demonstrates how to take photos and videos with the\n[Camera2 API](https://developer.android.com/guide/topics/media/camera):\n\n[See the Camera2 Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/Camera2Sample)\n\nGallery sample\n--------------\n\nThe following sample demonstrates how to browse and delete photos and videos:\n\n[See the Gallery Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/GallerySample)\n\nQR code scanner sample\n----------------------\n\nThe following sample demonstrates how to scan QR codes with the camera. It uses\n[CameraX API](https://developer.android.com/training/camerax) and\n[ZXing library](https://github.com/zxing/zxing) to do so.\n\n[See the QR Code Scanner Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/QRCodeScannerSample)\n\nVoice Recognition sample\n------------------------\n\n\nThe following sample app demonstrates the built-in [voice recognition functionality](/glass-enterprise/guides/inputs-sensors#voice-recognition).\n\n\n[See the Voice Recognition Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/VoiceRecognitionSample)\n\nNotes sample\n------------\n\n\nThe following sample app demonstrates the built-in\n[voice commands functionality](/glass-enterprise/guides/inputs-sensors#voice-commands)\nand how to use it with the built-in\n[voice recognition functionality](/glass-enterprise/guides/inputs-sensors#voice-recognition).\n\n\n[See the Notes Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/NotesSample)\n\nVoice commands reloading sample\n-------------------------------\n\n\nThe following sample app demonstrates how to\n[reload voice commands](/glass-enterprise/guides/inputs-sensors#voice-commands-reloading)\nand how to enable\n[debug mode](/glass-enterprise/guides/inputs-sensors#voice-commands-debug-mode) for\nvoice commands.\n\n\n[See the Voice Commands Reloading Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/VoiceCommandsReloadingSample)\n\nGesture detector sample\n-----------------------\n\nBasic navigation on Glass Enterprise Edition 2 device consists of detecting and responding to\ngesture events on the touchpad. [Inputs and sensors](/glass-enterprise/guides/inputs-sensors#touch-gestures) page contains more information about it. Review this sample for\nimplementation details.\n\n[See the Gesture Detector Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/GestureLibrarySample)\n\nWebRTC sample\n-------------\n\nAn example call center application that showcases video conferencing using\n[WebRTC](http://webrtc.github.io/webrtc-org/native-code/android/)\n\n[See the WebRTC Sample\nopen_in_new](https://github.com/googlesamples/glass-enterprise-samples/tree/master/WebRTCSample)"]]