public void setView(GLSurfaceView view) {
        pauseSensors();
        if (sensorManager != null) {
            sensorManager.unregisterListener(this);
        }
        if (view == null) {
            windowManager = null;
            sensorManager = null;
        } else {
            // Get instance of the WindowManager from the current Context
            windowManager = (WindowManager) view.getContext().getSystemService(Context.WINDOW_SERVICE);
            // Get instance of the SensorManager from the current Context
            sensorManager = (SensorManager) view.getContext().getSystemService(Context.SENSOR_SERVICE);
        }
    }
Internal class to enclose data for each sensor.
jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.java