Skip to main content

17 docs tagged with "Native"

View All Tags

Android Manifest

This guide explains the essential elements and attributes that you need to include in your Android Manifest file to deploy an OpenXR application to the Magic Leap 2 device. The Android Manifest file is an XML file that describes the basic characteristics of your application, such as its name, icon, permissions, features, and activities. It is located in the root directory of your project and has the name AndroidManifest.xml. For more information about the general syntax and structure of the Android Manifest file, you can refer to the Android Developer Guide.

Application Development 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

Building Application Framework Samples

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.

Building via Command Line

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.

C-API Samples Overview

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.

Environment Setup

This guide walks you through setting up your environment for native development on Magic Leap 2. By the end of the guide, you will have everything necessary to build and run the Magic Leap OpenXR samples, allowing you to explore the capabilities of OpenXR on Magic Leap 2 and develop your own AR applications.

HelloXR Sample Application

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.

Improve Visual Stability (C-API)

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.

Magic Leap OpenXR Samples

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.

MLSDK to OpenXR/Android APIs

This page includes a list of the MLSDK APIs and their equivalents available through OpenXR Extensions and standard Android APIs.

Modifying APK for AR

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:

OpenXR Overview

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.