Meta Spatial SDK allows you to add 3D features and elements to your Android projects through the combined use of Android Studio and Meta Spatial Editor. To get set up with Meta Spatial SDK, follow this tutorial.
When building with Meta Spatial SDK, your app can run in two different modes: immersive or non-immersive. Running immersively allows you to fully control the scene while running non-immersively limits your app to presenting as a single window. When your app takes advantage of both running modes, it is called a hybrid app.
Horizon UI Set
Built on the latest Reality Labs Design System (RLDS), the UI Set enables you to create a visually cohesive interface that aligns with Meta Horizon OS. This comprehensive set includes input modality support such as hands and controllers with proper interaction behaviors.
Download the Meta Horizon OS UI Set in Figma to start building with customizable, production-ready components. You can see additional recommendations for designing immersive 2D experiences using Meta Horizon OS UI Set here.
Design
Open in Figma. Check out the Getting Started page on how to use the UI Set library to design your own UI for immersive experiences.
Implementation
Follow the instructions on Meta Horizon OS UI Set overview page where you can find detailed information on how to use UI Set components in your Android projects.
Prefer building hybrid apps
Building your app as a hybrid application will give people more freedom and flexibility in how they use their app alongside other experiences within Meta Horizon OS. Hybrid Spatial SDK apps can take advantage of system window behaviors such as being positioned next to other windows, resizing, or going into a theater view while additionally allowing immersive experiences at the user’s discretion. A great example of this would be a media application that allows a user to choose to watch content non-immersively so they can multi-task with other applications if desired. See Spatial SDK’s hybrid sample app for an example.
Immersive experiences
Video 1: Mixed reality spectrum from the physical to virtual worlds
Your app can choose to launch into an immersive mode. When triggered, all other applications will disappear. This is a great way to pull focus to the content you’re presenting, show an immersive environment, or even add 3D effects to your app. Remember, not all experiences will benefit from removing people from the context of other applications and the world around them.
If your application is built as a Hybrid Spatial SDK app, this should be triggered directly by the user to meet their expectations. For example, it could be jarring for a user to suddenly lose context of their environment or other windows, especially if they were in passthrough.
When a user is in passthrough, this state should be preserved if possible, as it keeps users in a familiar context. Additionally try to avoid triggering exclusive mode while the user is in passthrough, as this will lead to other multitasking applications disappearing which can be unanticipated if you are not showing immersive content. Remember, only one exclusive mode application can run at a time.
Lastly, be mindful of scale and how much of the view is being obscured by your content while in passthrough, as this can diminish the sense of grounding and context that is given by passthrough.
You can also learn more about spatial anchoring and co-presence during passthrough in this guide.
Changing immersion levels
Be cognizant of transitions to the level of immersion of your app, such as changing from passthrough to a virtual environment. These transitions should be gradual and contain visual cues such as animation to help keep people grounded in the experience. Avoid abrupt motion during these transitions as they can cause unintended disorientation.
Make sure it’s clear what in an environment is interactive by giving the user clear affordances. This could be done through a glow on focus, visual placement of the element, spatial audio, or motion.
See Input Modalities to ensure your application works well with the various types of input a user may use.
Context of use
Consider where someone might be while using the app. Is the app intended to be used at roomscale or stationary with the user sitting down? Being aware of this can help you make smart decisions about how your app should run, how long people will be using it for, and what else they might be doing while using your application.