Hello friends in my app I want to put sensor like when I rotate mobile from north to south at this time sensor is called, for that I see TYPE_GYROSCOPE is used but I don't know exactly how it can be used for my app
Please give any example for when I rotate my phone from north to south that sensor type is called. I have used the following
@Override
public void onSensorChanged(SensorEvent event) {
if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) {
// code here
}
}
but if is not true always so not get pointer to the inside if body