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.
Android Permissions
Learn how to manage Android based Permissions inside your Magic Leap application.
Android Permissions
Learn how to manage Android based Permissions inside your Magic Leap application.
Android Sensor API
Developers can access a variety of Magic Leap 2’s sensors to obtain information about the environment and the device’s orientation, motion, and position. These sensors can be accessed via the standard Android Sensor API, which allows you to register listeners for sensor events, get sensor data, and manage sensor resources. The available sensors include:
Android Studio Workflow
Overview
API Level
Learn how to declare the minimum API level so that your application can indicate which APIs are expected to be implemented.
API Level
Learn how to declare the minimum API level so that your application can indicate which APIs are expected to be implemented.
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 Android Studio
Overview
Camera2
The Magic Leap 2 supports the Android Camera2 NDK APIs. With Android Camera allows developers to capture real and virtual content inside their applications. While the Magic Leap 2 has only one physical, it is presented as 3 separate devices in the API. The Main Camera (Camera Id 0) and Mixed Reality Camera (Camera Id 3) are mutually exclusive, however they can be accessed even while the CV Camera (Camera Id 1) is being used.
Command Line Workflow
Overview
Declaring Permissions
Learn how to declare permissions to access normal features or request access to dangerous ones.
Declaring Permissions
Learn how to declare permissions to access normal features or request access to dangerous ones.
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.
Getting Started
These guides serve as a starting point for Magic Leap app development in Unity using OpenXR. If this is your first time developing for Magic Leap, we recommend that you follow the guides sequentially. If you are an experienced Magic Leap developer, these guides can be used as standalone references.
Getting Started
This section includes information on how to detect if an application is running on a Magic Leap 2 in addition to checking if a developer is most likely building for Magic Leap 2.
Getting Started
These guides serve as a starting point for Magic Leap app development in Unity. If this is your first time developing for Magic Leap, we recommend that you follow the guides sequentially. If you are an experienced Magic Leap developer, these guides can be used as standalone references.
Getting Started
Unreal Engine 5 allows you to create applications for Magic Leap 2 devices using OpenXR APIs. To build Unreal Applications for Magic Leap 2 developers will need to compile Unreal Engine from source, using the fork for MagicLeap 2. This fork enables developers to build Magic Leap 2 applications with Unreal Engine.
Install the Tools
This section provides information on how to install and configure the Unity Editor required to develop for Magic Leap 2.
Install the Tools
This section provides information on how to install and configure the Unity Editor required to develop for Magic Leap 2.
Intents
The Magic Leap 2 uses an Android based operating system which provides access to core Android-based features. This section will provide an overview on how developers can use intents to open external activities on the Magic Leap 2.
Rendering Extensions Overview
This section includes information about the Magic Leap 2 OpenXR Rendering Extensions Feature that will make your content appear more robust.
Requesting Magic Leap Permissions
Learn how to request or check Magic Leap permissions at runtime.
Requesting Permissions
Learn how to request or check Magic Leap permissions at runtime.
Supported OpenXR Features
These Magic Leap 2 features are supported for Unreal Engine 5.3 with Magic Leap 2 SDK for Unreal Engine 5 (Magic Leap Unreal SDK).
Unity Overview
This section includes information about developing Unity applications for Magic Leap 2.
Unity Sensor Input
Sensors are devices that measure environmental characteristics of the device that the content is running on, such as light, pressure, temperature, orientation, and motion. Unity’s Input System allows you to access sensors on Android devices using the standard Android Sensor API. In this guide, we will show you how to enable, disable, and read data from sensors on Android using the Input System.
Unity Sensor Input
Sensors are devices that measure environmental characteristics of the device that the content is running on, such as light, pressure, temperature, orientation, and motion. Unity’s Input System allows you to access sensors on Android devices using the standard Android Sensor API. In this guide, we will show you how to enable, disable, and read data from sensors on Android using the Input System.
USB SIP/SOP Intents
Magic Leap 2 (ML2) devices provide a USB SIP/SOP flow on medical devices that is 60601 compliant. We’ve introduced custom Android intents to enable our users to implement their own flow. This functionality broadcasts custom Android Intents when specific events occur - event intents.
Voice Commands
The Magic Leap 2 offers Speech Commands, which allow applications to perform custom and system actions. When enabled, users can use their voice to interact with applications on the device. The can also be used to perform system tasks, such as changing the volume of audio, exiting an application or taking a camera capture, in place of using other input methods. Notably, these speech commands work offline which means they can be used even when there is no network connection.
Voice Intent Development Toolkit
Overview
VR Template
This guide will demonstrate how to use the UE Enhanced Inputs to modify the Unreal Engine VR Template VRPawn blueprint graph to work with the Magic Leap 2 controller.