use of android.hardware.SensorEventListener in project xDrip-plus by jamorham.
the class Reminders method onPause.
@Override
protected void onPause() {
super.onPause();
Log.d(TAG, "onPause");
final SensorEventListener activity = this;
JoH.runOnUiThreadDelayed(new Runnable() {
@Override
public void run() {
Log.d(TAG, "Unregistering proximity sensor listener");
try {
mSensorManager.unregisterListener(activity);
} catch (Exception e) {
Log.d(TAG, "Error unregistering proximity listener: " + e);
}
}
}, 10000);
}
Aggregations