Commit 035fb89e authored by Benjamin LEROUX's avatar Benjamin LEROUX

DELAY COMMIT

parent f4ea1cff
...@@ -258,6 +258,11 @@ public class MainActivity extends AppCompatActivity implements SensorEventListen ...@@ -258,6 +258,11 @@ public class MainActivity extends AppCompatActivity implements SensorEventListen
public void onAccuracyChanged(Sensor sensor, int accuracy) {// TODO Auto−generated method stub public void onAccuracyChanged(Sensor sensor, int accuracy) {// TODO Auto−generated method stub
} }
protected void onResume() {
super.onResume();
mSensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_GAME);
}
@Override @Override
public void onSensorChanged(SensorEvent event) {// TODO Auto−generated method stub public void onSensorChanged(SensorEvent event) {// TODO Auto−generated method stub
DisplayMetrics displayMetrics = new DisplayMetrics(); DisplayMetrics displayMetrics = new DisplayMetrics();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment