Skip to main content
Version: 21 Aug 2024

Intents

Unity developers can use intents inside their applications to open external activities and services. For example, you can use Intents to open the Eye Calibration application after detecting poor accuracy when using the Eye Tracking feature, or if you want the user to localize into a map before loading the content from your application. This section provides examples of how to call both implicit and explicit intents.

To learn more about intents, including Magic Leap specific intents, see the Intents Overview page or Android's Intents Documentation.

Magic Leap also includes an API to open Magic Leap System Settings from inside your application. The UnityEngine.XR.MagicLeap.SettingsIntentsLauncher is pre-configured to allow developers to open the device's Display Settings, Voice Input settings, and AR Cloud Settings using a single line of code. Additional intents can be launched by passing the Intent Action ID.

Launching pre-defined intents:

UnityEngine.XR.MagicLeap.SettingsIntentsLauncher.LaunchSystemVoiceInputSettings();

Launching custom intents:

string intentID = "com.magicleap.intent.action.FITTING";
UnityEngine.XR.MagicLeap.SettingsIntentsLauncher.LaunchSystemSettings(intentID);