The arguments to the method include an integer that identifies the sensor that changed, along with an array of float values representing the sensor data itself.
该方法的参数包括:一个整数,指示更改的传感器;一个浮点值数组,表示传感器数据本身。
Once the sending sensor is identified, the appropriate UI elements are updated with data contained in the array of float values passed as the second argument to the method.
确认了发送数据的传感器之后,将使用方法第二个参数传递的浮点值数组中所包含的数据更新相应的ui元素。
The onSensorChanged(int sensor,float values[]) method is invoked whenever a sensor value has changed.
onSensorChanged(int sensor,float values[]) 方法在传感器值更改时调用。
应用推荐