Existing 2D mobile apps are automatically compatible with Android XR headsets and wired XR glasses devices as long as they don't require any features that are unsupported, such as telephony. Users can complete critical task flows in an Android XR compatible app, but they'll have a less-optimal user experience. Ideally, you should design a differentiated experience for XR that implements features that are only offered on XR devices. For more information, see our developer guide for bringing your app into 3D with XR.
However, while you develop spatial features for your app, you can also optimize your existing app experience for users who have it on their Android XR devices today. To achieve this, follow the adaptive app quality guidelines and aim for at least Tier 2 support. As you begin, review the sections in this guide, which highlight the areas you can focus on to promote a great experience for your users on Android XR.
Check your app
Check your app for each of the following categories that commonly affect an app's experience on Android XR. For each category, see the related adaptive app guidelines and developer guides to help you build a great adaptive experience.
Display and orientation
Many common issues in Android XR are caused by assumptions about a device's orientation and screen configuration.
What to check
- Natural orientation mismatches: Most mobile phones have a natural orientation (
Surface.ROTATION_0) that corresponds to portrait mode, whereas many XR devices use landscape as their natural orientation. - Avoid orientation hardcoding: Hardcoding an app's orientation can prevent it from adapting to different screens and form factors.
- Configuration changes: Make sure your app handles configuration changes. Don't assume a device is a mobile phone when laying out your app.
- Layout and rendering: XR devices like XR headsets and wired XR glasses can have very high resolution displays. Check specific window bounds instead of the physical display size to avoid overly large or cropped UI elements. Don't place app content and interactive buttons too close to the edge of a window to avoid clipping.
Guidance
- Developer guides:
- Adaptive app guidelines:
Dynamic resizing and multi-window
XR headsets and wired XR glasses feature spatial environments where app windows can be resized and repositioned freely.
What to check
- Support window resizing: Your app should maintain user progress, scroll position, and text input during and after resizing events. In addition, make sure you adapt your app's UI to the new window dimensions.
Guidance
- Developer guides:
- Adaptive app guidelines:
Cameras
Camera apps require special considerations for sensors and the virtual, front-facing cameras on XR headsets and wired XR glasses.
What to check
- Natural device orientation: XR devices often use a landscape orientation as their natural orientation. The system counts camera sensor rotation values relative to the device's natural orientation. This means that on XR devices, when the camera sensor is at 0 degrees of rotation, the orientation would usually be landscape, whereas on a phone, the orientation would usually be portrait. For this reason, don't assume either the device or camera sensor orientation based on the rotation angle value.
- Virtual front-facing cameras: Unlike a mobile phone, XR devices with a front-facing camera provide a virtual, avatar view of the user. This virtual view might be flipped horizontally, so your app shouldn't assume a certain orientation.
Guidance
- Developer guides:
- Adaptive app guidelines:
Input
Apps should support the variety of input methods supported on XR headsets and wired XR glasses.
What to check
- Touch targets: Use larger touch targets than other form factors to increase precision, comfort, and usability.
- Keyboard support: Test your app with both the system virtual keyboard and external keyboards.
- Gamepad support: Support game controllers while navigating app menus and during gameplay.
Guidance
- Developer guides:
- Adaptive app guidelines:
- Touch_Targets (see Targets in Android XR for XR-specific target sizes)
- Keyboard_Input
System lifecycle
Apps should handle system lifecycle events gracefully.
What to check
- Audio and video continuity during resizing: Media playback should stay synchronized during window resizing.
- Audio and video continuity when doffing and donning: Media playback should resume where it left off when a user takes the device off or puts it back on.
Guidance
- Developer guides:
- Adaptive app guidelines: