android SensorEventListener problem
问题 I am trying to create an application which reads data from digital compass. I tried to reuse the code from the book Professional Android Application Development but the IDE displayed a note The type SensorListener is deprecated I guess it is because the code from the book is written for the earlier SDK version so I tried to use SensorEventListener instead. Then when I tried to register the listener sensorManager.registerListener(sensorListener, SensorManager.SENSOR_ORIENTATION, SensorManager