Android Studio Gyroscope examples?
问题 I'm trying to build an application which does a desired affect when the device is tilted to a certain degree. I've taken a look at, and successfully enabled, an accelerometer, but this doesn't give me the desired affect. Like I said, I wish the device to do what I want it to, only when the device has achieved a certain degree, say 90 degrees. I've got the following code, but this only works when the device is tilted fast enough: @Override public void onSensorChanged(SensorEvent sensorEvent) {