private boolean registerListener(int sensorType) {
        SensorData sensorData = sensors.get(sensorType);
        if (sensorData != null) {
            if (sensorData.enabled) {
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "Sensor Already Active: SensorType: {0}, active: {1}",
                            new Object[]{sensorType, sensorData.enabled});
                }
                return true;
            }
            sensorData.haveData = false;
            if (sensorData.sensor != null) {
                if (sensorManager.registerListener(this, sensorData.sensor, sensorData.androidSensorSpeed)) {
                    sensorData.enabled = true;
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, "SensorType: {0}, enabled: {1}",
                                new Object[]{sensorType, sensorData.enabled});
                    }
                    return true;
                } else {
                    sensorData.enabled = false;
                    logger.log(Level.FINE, "Sensor Type {0} activation failed.", sensorType);
                }
            }
        }
        return false;
    }
Internal class to enclose data for each sensor.
jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.java