Code example for OrientationEventListener

Methods: disable

0
	/** 
	 * stop sensors 
	 */ 
	public void onPause() { 
		mSensorManager.unregisterListener(mListener);
		mOrientationListener.disable();
		toggleGPS(false); 
	} 
 
	/** 
	 * start sensors 
	 */ 
	public void onResume() { 
		mSensorManager.registerListener(mListener, mSensorAcceleration, SensorManager.SENSOR_DELAY_GAME);
		mSensorManager.registerListener(mListener, mSensorMagnetic, SensorManager.SENSOR_DELAY_GAME);
		mOrientationListener.enable();
		toggleGPS(true); 
	} 
 
	public void setDestination(double latitude, double longitude) {
Connect your IDE to all the code out there  Get Codota for Java