Code example for GLSurfaceView

Methods: requestRender

0
		 
		@Override 
		public void onSensorChanged(SensorEvent event) {
			if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) {
				SensorManager.getRotationMatrixFromVector(mRotationMatrix, event.values);
				mGLSurfaceView.requestRender();
			} 
		} 
 
		@Override 
		public void onAccuracyChanged(Sensor sensor, int accuracy) {}
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java