diff --git a/README.md b/README.md index 480a59f71a3174007264ec0979c9718696354e92..fe90d5a778fc6d42d16ee02cde223641d6ec269d 100755 --- a/README.md +++ b/README.md @@ -120,17 +120,17 @@ The sensor JS APIs listen for sensor data changes. If an API is called multiple -
on(type: SensorType, callback: AsyncCallback<Response>, options?: Options)
+on(type: SensorType, callback: Callback<Response>, options?: Options)
Subscribes to a type of sensor that listens for changes of sensor data. SensorType indicates the type of the sensor that can be subscribed to. callback specifies whether the subscription is successful. options indicates the interval for reporting sensor data.
Subscribes to a type of sensor that listens for the sensor data change once. SensorType indicates the type of the sensor that can be subscribed to. callback specifies whether the subscription is successful.
Unsubscribes from a type of sensor that listens for data changes. SensorType indicates the type of the sensor that can be unsubscribed from. callback specifies whether the unsubscription is successful.
on(type: SensorType, callback: AsyncCallback<Response>, options?: Options)
+on(type: SensorType, callback: Callback<Response>, options?: Options)
监听传感器数据变化。SensorType为支持订阅的传感器类型,callback表示订阅传感器的回调函数,options为设置传感器数据上报的时间间隔。