Skip to main content
Version: 0.23.2

Snapdragon Spaces Custom Launcher

The current architecture of Snapdragon Spaces is optimized for creating headworn experiences, with the primary application experience being in the headset / glasses, supported by either hand tracking, hardware controllers, or a touchscreen interface simulating a controller, the latter of which is referred to as a Companion Controller, all of which communicate using OpenXR Profiles.

This architecture allows some apps to be built and run across form factors without needing to recompile. As such, it's important to understand the architecture of what is happening under the hood.

Custom Launcher

When building apps for Snapdragon Spaces, the first activity that launches is an included Custom Launcher that queries the device for the presence of the Snapdragon Spaces runtime, and performs permissions checks as well. Once those have passed, this custom launcher will check the device to see if it's connected via a mobile phone plus glasses form factor, or if it's connected via a purely headworn form factor.

In a headworn form factor, the activity designed for the headset is launched directly on the device.

In a mobile plus glasses form factor, a Companion Controller activity is launched on the mobile phone immediately while the activity designed for the headset is launched on the connected glasses. These two activities have no knowledge of each other, and communicate via an OpenXR bridge. Even when the Companion Controller activity is swiped away and closed, it does not close the app, and the headset activity will still run, requiring a proper exit signal from the app or a Force Stop.

GLASSES NOT CONNECTED

If a headworn Spaces app is launched on a mobile phone without the glasses connected, the headworn activity will launch on the mobile device. This can be exited by simply swiping away the activity from the Android UI.

Companion Controller

On form factors with a connected mobile phone, the Companion Controller is provided by default as an included precompiled Android activity to handle input using the touchscreen. This precompiled binary transmits touches as buttons and also sends rotation information into the OpenXR Runtime, which then gets read by the running activity.

Companion Controller

How to use the Companion Controller:

  • A click on the touchpad is mapped to trigger a select or click event.
  • Apps can choose how to respond to the Menu button.
  • The rotation of the controller can rotationally steer a "laser pointer" from the device pointer using three degrees of freedom.
  • The reset button can be used to readjust the orientation of the device as needed for alignment calibration.

While additional buttons are not supported by this form factor since functionality is restricted to conformance to an OpenXR controller profile, the design of the Companion Controller screen and button placement can be customized. See Custom Controller for more details.