Why onSensorChange is not invoked when Wearable device is in Ambient Mode
问题 I'm developing a wearable app and I've noticed a strange behaviour. I have a class FooService extends Service implements SensorEventListener and I've override onSensorChanged() method: @Override public void onSensorChanged(SensorEvent sensorEvent) { if (sensorEvent.sensor.getType() != Sensor.TYPE_ACCELEROMETER) { Log.e(TAG, getString(R.string.err_wrong_sensor_registered)); return; } float x = sensorEvent.values[0]; float y = sensorEvent.values[1]; float z = sensorEvent.values[2]; ... } This