Android Studio Workflow
Overview
Overview
For developers familiar with C++ but new to OpenXR, check out the OpenXR Tutorial by Khronos, the organization behind the OpenXR standard. This tutorial serves as a step-by-step guide, introducing you to essential OpenXR APIs and concepts. You will learn how to set up your development environment, initialize OpenXR, render graphics, handle input, and explore the OpenXR features and extensions. Learn More
These guides go through how to build the ML C api samples, which can serve as a starting point for Native Magic Leap app development. Before building the Magic Leap Samples, make sure to complete the Environment Setup instructions.
This section outlines the steps required to build the Magic Leap OpenXR Samples using the build.py script from the command line. Before attempting to build the samples, please complete the environment setup steps in Environment Setup. The build script uses gradle to build each of the applications.
The list below contains descriptions of each of the C-API samples available in the ML Hub. The README.md files of each example contain instructions on how to build, install and uninstall the example, as well as its expected behavior and GUI.
Overview
Khronos' OpenXR SDK Source repo includes the helloxr sample app. This application can be used as a starting point to understand the basic functionality of OpenXR on a given device.
This article discusses how to improve visual stability for apps created using the Magic Leap Native API (C-API). For information a more recent article about how to improve visual stability for apps creating using OpenXR, see Improve Visual Stability in OpenXR.
The Magic Leap Hub (ML Hub) includes a set of samples that demonstrate some of Magic Leap's device specific features. These samples can be downloaded via ML Hub's Package Manager and then built using Android Studio or a command line interface using the build.py script.
This page includes a list of the MLSDK APIs and their equivalents available through OpenXR Extensions and standard Android APIs.
In most cases, you can simply create a new Native C++ project in Android Studio and build it for the Magic Leap 2 platform. However, if you need the output to be in AR space, there are a few modifications necessary:
We are proud to announce that Magic Leap 2 is now conformant with OpenXR. As an early contributor in the development of OpenXR, we're committed to building an open and accessible augmented reality (AR) ecosystem that benefits enterprises and developers across industries.
Running Your App (C-API)
This section reviews different steps you can take to troubleshoot problems you may encounter when using Application Simulator. Topics covered include: