@Override
 public void onPause() {
   super.onPause();
   compassSensorManager.onPause();
 }
 @Override
 public void onResume() {
   super.onResume();
   compassSensorManager.onResume();
 }