Develop

Gaze SDK for Jetpack Compose

Updated: Sep 3, 2026
Meta Horizon OS infers gaze targets from Jetpack Compose accessibility semantics. Use the Meta VR Gaze SDK when you need to override that inference, exclude an element from gaze targeting, or add a hover tooltip.
Most apps do not need a Gaze SDK to support Look and Pinch because Meta Horizon OS handles most interaction detection automatically.
Unstable SDK
The Meta VR Gaze SDK is unstable and available by request through the Meta Horizon developer support form⁠. Select Technical Support in the form when requesting the SDK. It is compatible with Meta Horizon OS v207, but apps submitted to the Meta Horizon Store with the SDK bundled will be rejected in order to ensure compatibility with future OS versions. A stable version will be published in a future release before Meta VR Glasses launch.
The SDK requires Kotlin 2.1.0 or later and Jetpack Compose 1.9 or later. Jetpack Compose 1.10 or later is recommended for more accurate hover shapes.
On Android devices without Look and Pinch support, these compatibility modifiers have no gaze-specific effect. You do not need platform checks around them.

Add the SDK

The SDK package includes gaze-compose-0.4.0.aar. Copy the AAR into the app module’s libs/ directory.
Add the local AAR in the app module’s build.gradle.kts:
dependencies {
    implementation(files("libs/gaze-compose-0.4.0.aar"))
}

Control interaction targeting and tooltips

gazeImportantForInteraction sets a composable’s Important for Interaction behavior. This determines whether the system considers it interactable for hover highlighting and whether it occludes interactable elements behind it.
ImportantForInteraction.Auto uses accessibility semantics to infer interactability. For example, clickable, combinedClickable, toggleable, triStateToggleable, and progress semantics make a composable interactable. Click and long-click actions, toggle state, range information, and some accessibility roles can also make it interactable. ImportantForInteraction.Yes explicitly marks the composable as a gaze target and occludes elements behind it. ImportantForInteraction.No does more than remove the system-provided hover effect: it removes the composable from gaze targeting, so it does not occlude interactable elements behind it. It does not remove click handling.
Call excludeDescendants() in the interaction scope to prevent child composables from becoming separate gaze targets, regardless of their own ImportantForInteraction values. Use it when a container should provide one hover target for nested content.
gazeTooltip displays a tooltip when the user looks at the composable while Look and Pinch is enabled. It does not show the tooltip when a user hovers with controllers or hands on devices without eye tracking, including Meta Quest headsets.
The following example makes a Box the single gaze target for a nested Button and adds a tooltip. It belongs inside a composable where onOpenSettings is in scope.
Box(
    modifier = Modifier
        .gazeImportantForInteraction(ImportantForInteraction.Yes) {
            excludeDescendants()
        }
        .gazeTooltip(text = "Settings") {
            position = TooltipPosition.Bottom
        },
) {
    Button(onClick = onOpenSettings) {
        Text("Settings")
    }
}
TooltipPosition supports Auto, Top, Bottom, Start, and End.
The Compose SDK does not replace click semantics. Keep click handlers and accessibility labels on elements that users can activate.

Test the result

Verify targeting and tooltip behavior on a supported device. Keep visual bounds, click targets, and accessibility semantics aligned so the system highlights the same element that receives the action.