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:
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.