Hello I want to use the type type_orientation
but it is deprecated for the android 4.0.3 . I use it for the augmented reality. I tried to find on the net but without success. My application works but my text inside stay in the same place! Here my code:
@Override
protected void onStart() {
super.onStart();
sensorMngr = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
sensorLstr = createListener();
sensorMngr.registerListener(sensorLstr, sensorMngr.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_UI);
}
@Override
protected void onStop() {
super.onStop();
sensorMngr = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
sensorMngr.unregisterListener(sensorLstr, sensorMngr.getDefaultSensor(Sensor.TYPE_ORIENTATION));
}
Everything it s good just this, i looked already on http://developer.android.com/reference/android/hardware/Sensor.html, but i can t understand (I m french and my english is not very perfect...) Thank you very much for your help!!!