When I try to implement SensorEventListener in my application, I repeatedly received the following error message in LogCat:
12-25 17:33:57.210: ERROR/QemuSensors(58): data__poll: len=-1, errno=9: Bad file number
And this is how I declare a listener inside an activity class:
private final SensorEventListener mSensorListener = new SensorEventListener() {
public void onSensorChanged(SensorEvent se) {
}
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
};
It is strange that the application and the sensor seem to be working fine. Does anyone know how this happened and how to fix it?
thank
source
share