Code example for SensorManager

Methods: unregisterListener

0
		 
	} 
	 
	public void stop() 
	{ 
		this.sensorManager.unregisterListener(this);
	} 
	 
	public void onAccuracyChanged(Sensor sensor, int accuracy) {
		// TODO Auto-generated method stub 
		 
	} 
 
 
	public void onSensorChanged(SensorEvent event) {
		// We only care about the orientation as far as it refers to Magnetic North 
		float heading = event.values[0];
		mAppView.loadUrl("javascript:gotBearing(" + heading + ")");
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE