以下示例可帮助您为 Glass Enterprise Edition 2 构建应用。
卡片示例
以下示例演示了如何构建基本界面:
![示例文本卡片界面](https://developers.google.cn/static/glass-enterprise/images/card_sample_4.png?hl=sl)
![列卡片界面示例](https://developers.google.cn/static/glass-enterprise/images/card_sample_5.png?hl=sl)
![示例菜单界面](https://developers.google.cn/static/glass-enterprise/images/card_sample_6.png?hl=sl)
Camera2 示例
以下示例演示了如何使用 Camera2 API 拍摄照片和视频:
![拍照](https://developers.google.cn/static/glass-enterprise/images/camera_sample_4.png?hl=sl)
![录制视频](https://developers.google.cn/static/glass-enterprise/images/camera_sample_5.png?hl=sl)
![录像](https://developers.google.cn/static/glass-enterprise/images/camera_sample_6.png?hl=sl)
图库示例
以下示例演示了如何浏览和删除照片和视频:
![图集图片](https://developers.google.cn/static/glass-enterprise/images/gallery_sample_1.png?hl=sl)
![全屏图片](https://developers.google.cn/static/glass-enterprise/images/gallery_sample_2.png?hl=sl)
![删除菜单选项](https://developers.google.cn/static/glass-enterprise/images/gallery_sample_3.png?hl=sl)
二维码扫描器示例
以下示例演示了如何使用相机扫描二维码。为此,它使用 CameraX API 和 ZXing 库。
![图集图片](https://developers.google.cn/static/glass-enterprise/images/qr_scanner_sample_1.png?hl=sl)
![全屏图片](https://developers.google.cn/static/glass-enterprise/images/qr_scanner_sample_2.png?hl=sl)
![删除菜单选项](https://developers.google.cn/static/glass-enterprise/images/qr_scanner_sample_3.png?hl=sl)
语音识别示例
以下示例应用演示了内置语音识别功能。
![语音识别应用主屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_recognition_1.png?hl=sl)
![语音识别应用捕获语音屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_recognition_2.png?hl=sl)
![包含结果的语音识别应用主屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_recognition_3.png?hl=sl)
备注示例
以下示例应用演示了内置语音指令功能以及如何将其与内置语音识别功能搭配使用。
![语音识别应用主屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_commands_1.png?hl=sl)
![语音识别应用捕获语音屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_commands_2.png?hl=sl)
![包含结果的语音识别应用主屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_commands_3.png?hl=sl)
语音指令重新加载示例
以下示例应用演示了如何重新加载语音指令,以及如何为语音指令启用调试模式。
![语音识别应用主屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_commands_reloading_1.png?hl=sl)
![语音识别应用捕获语音屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_commands_reloading_2.png?hl=sl)
![包含结果的语音识别应用主屏幕](https://developers.google.cn/static/glass-enterprise/images/voice_commands_reloading_3.png?hl=sl)
手势检测器示例
Glass Enterprise Edition 2 设备的基本导航包括检测和响应触控板上的手势事件。输入源和传感器页面中包含关于它的更多信息。如需了解实现详情,请参阅此示例。
WebRTC 示例
展示使用 WebRTC 进行视频会议的呼叫中心应用示例