Check device capabilities at runtime for AI glasses
Stay organized with collections
Save and categorize content based on your preferences.
Different types of AI glasses have different capabilities. After planning how
you'll support different types of AI devices, you can check for device
capabilities at runtime to provide the best experience for a user's device.
Check whether a device has a display
Some AI glasses have a display where your app can show UIs built with Jetpack
Compose Glimmer. The following example shows how to check whether a glasses
device has a display:
val projectedDeviceController = ProjectedDeviceController.create(activity)
if (projectedDeviceController.capabilities.contains(CAPABILITY_VISUAL_UI)) {
// Set up UX state machine for AI glasses that have a display.
} else {
// Set up UX state machine for AI glasses that don't have a display.
}
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-12-08 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 2025-12-08 UTC."],[],[]]