- All Implemented Interfaces:
- android.hardware.SensorEventListener
public class AndroidSensorJoyInput
extends java.lang.Object
implements android.hardware.SensorEventListener
AndroidSensorJoyInput converts the Android Sensor system into Joystick events.
A single joystick is configured and includes data for all configured sensors
as separate axes of the joystick.
Each axis is named according to the static strings in SensorJoystickAxis.
Refer to the strings defined in SensorJoystickAxis for a list of supported
sensors and their axis data. Each sensor type defined in SensorJoystickAxis
will be attempted to be configured. If the device does not support a particular
sensor, the axis will return null if joystick.getAxis(String name) is called.
The joystick.getXAxis and getYAxis methods of the joystick are configured to
return the device orientation values in the device's X and Y directions.