以下範例可協助您建構 Google Glass Enterprise Edition 2 的應用程式。
卡片範例
以下範例說明如何建構基本 UI:
![文字資訊卡 UI 範例](https://developers.google.cn/static/glass-enterprise/images/card_sample_4.png?authuser=0000&hl=zh-tw)
![範例資訊卡資訊卡 UI 範例](https://developers.google.cn/static/glass-enterprise/images/card_sample_5.png?authuser=0000&hl=zh-tw)
![範例選單使用者介面](https://developers.google.cn/static/glass-enterprise/images/card_sample_6.png?authuser=0000&hl=zh-tw)
Camera2 範例
以下範例說明如何使用 Camera2 API 拍攝相片和影片:
![拍照](https://developers.google.cn/static/glass-enterprise/images/camera_sample_4.png?authuser=0000&hl=zh-tw)
![錄影](https://developers.google.cn/static/glass-enterprise/images/camera_sample_5.png?authuser=0000&hl=zh-tw)
![錄影](https://developers.google.cn/static/glass-enterprise/images/camera_sample_6.png?authuser=0000&hl=zh-tw)
圖庫範例
以下範例說明如何瀏覽及刪除相片和影片:
![圖庫圖片](https://developers.google.cn/static/glass-enterprise/images/gallery_sample_1.png?authuser=0000&hl=zh-tw)
![全螢幕圖片](https://developers.google.cn/static/glass-enterprise/images/gallery_sample_2.png?authuser=0000&hl=zh-tw)
![刪除選單選項](https://developers.google.cn/static/glass-enterprise/images/gallery_sample_3.png?authuser=0000&hl=zh-tw)
QR 圖碼掃描器範例
以下範例說明如何透過相機掃描 QR 圖碼。例如使用 CameraX API 和 ZXing 程式庫。
![圖庫圖片](https://developers.google.cn/static/glass-enterprise/images/qr_scanner_sample_1.png?authuser=0000&hl=zh-tw)
![全螢幕圖片](https://developers.google.cn/static/glass-enterprise/images/qr_scanner_sample_2.png?authuser=0000&hl=zh-tw)
![刪除選單選項](https://developers.google.cn/static/glass-enterprise/images/qr_scanner_sample_3.png?authuser=0000&hl=zh-tw)
語音辨識範例
下列範例應用程式示範內建語音辨識功能。
![Voice Recogntion 應用程式主畫面](https://developers.google.cn/static/glass-enterprise/images/voice_recognition_1.png?authuser=0000&hl=zh-tw)
![Voice Recogntion 應用程式擷取語音畫面](https://developers.google.cn/static/glass-enterprise/images/voice_recognition_2.png?authuser=0000&hl=zh-tw)
![Voice Recogntion 應用程式主畫面並顯示結果](https://developers.google.cn/static/glass-enterprise/images/voice_recognition_3.png?authuser=0000&hl=zh-tw)
Notes 範例
這個範例應用程式示範內建語音指令功能,以及如何將其與內建語音辨識功能搭配使用。
![Voice Recogntion 應用程式主畫面](https://developers.google.cn/static/glass-enterprise/images/voice_commands_1.png?authuser=0000&hl=zh-tw)
![Voice Recogntion 應用程式擷取語音畫面](https://developers.google.cn/static/glass-enterprise/images/voice_commands_2.png?authuser=0000&hl=zh-tw)
![Voice Recogntion 應用程式主畫面並顯示結果](https://developers.google.cn/static/glass-enterprise/images/voice_commands_3.png?authuser=0000&hl=zh-tw)
語音指令重新載入中範例
下列範例應用程式示範如何重新載入語音指令,以及如何為語音指令啟用偵錯模式。
![Voice Recogntion 應用程式主畫面](https://developers.google.cn/static/glass-enterprise/images/voice_commands_reloading_1.png?authuser=0000&hl=zh-tw)
![Voice Recogntion 應用程式擷取語音畫面](https://developers.google.cn/static/glass-enterprise/images/voice_commands_reloading_2.png?authuser=0000&hl=zh-tw)
![Voice Recogntion 應用程式主畫面並顯示結果](https://developers.google.cn/static/glass-enterprise/images/voice_commands_reloading_3.png?authuser=0000&hl=zh-tw)
手勢偵測工具範例
Glass Enterprise Edition 2 裝置的基本操作包括偵測並回應觸控板上的手勢事件。輸入和感應器頁面含有更多相關資訊。請查看此實作範例。
WebRTC 範例
呼叫中心應用程式範例,示範如何使用 WebRTC 顯示視訊會議