@@ -1275,7 +1275,7 @@ Subscribes to data of the linear acceleration sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1313,7 +1313,7 @@ Subscribes to data of the magnetic field sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1351,7 +1351,7 @@ Subscribes to data of the uncalibrated magnetic field sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1392,7 +1392,7 @@ Subscribes to data of the orientation sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1432,7 +1432,7 @@ Subscribes to data of the pedometer sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1470,7 +1470,7 @@ Subscribe to data of the pedometer detection sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1506,7 +1506,7 @@ Subscribes to data of the proximity sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1542,7 +1542,7 @@ Subscribes to data of the rotation vector sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1581,7 +1581,7 @@ Subscribes to data of the significant motion sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -1617,7 +1617,7 @@ Subscribes to data of the wear detection sensor once.
**Error code**
For details about the following error codes, see [Error Codes of ohos.sensor](../errorcodes/errorcode-sensor.md).
For details about the following error codes, see [Sensor Error Codes](../errorcodes/errorcode-sensor.md).
| Error Code ID| Error Message |
| -------- | ------------------ |
...
...
@@ -3652,37 +3652,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.on.LI
| callback | Callback<[LinearAccelerometerResponse](#linearaccelerometerresponse)> | Yes | Callback used to return the linear acceleration sensor data. The reported data type in the callback is **LinearAccelerometerResponse**. |
| options | [Options](#options) | No | Interval at which the callback is invoked to return the sensor data. The default value is 200,000,000 ns. |
Subscribes to data changes of the linear acceleration sensor. If this API is called multiple times for the same application, the last call takes effect.
| type | [SensorType](#sensortype) | Yes | Type of the sensor to subscribe to, which is **SENSOR_TYPE_ID_LINEAR_ACCELEROMETER**. |
| callback | Callback<[LinearAccelerometerResponse](#linearaccelerometerresponse)> | Yes | Callback used to return the linear acceleration sensor data. The reported data type in the callback is **LinearAccelerometerResponse**. |
| options | [Options](#options) | No | Interval at which the callback is invoked to return the sensor data. The default value is 200,000,000 ns. |
@@ -4191,35 +4141,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.on.HE
| type | [SensorType](#sensortype) | Yes | Type of the sensor to subscribe to, which is **SENSOR_TYPE_ID_HEART_RATE**. |
| callback | Callback<[HeartRateResponse](#heartrateresponse)> | Yes | One-shot callback used to return the heart rate sensor data. The reported data type in the callback is **HeartRateResponse**. |
| type | [SensorType](#sensortype) | Yes | Type of the sensor to subscribe to, which is **SENSOR_TYPE_ID_HEART_BEAT_RATE**. |
| callback | Callback<[HeartRateResponse](#heartrateresponse)> | Yes | One-shot callback used to return the heart rate sensor data. The reported data type in the callback is **HeartRateResponse**. |
@@ -4302,7 +4220,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[AccelerometerResponse](#accelerometerresponse)> | Yes | One-shot callback used to return the acceleration sensor data. The reported data type in the callback is **AccelerometerResponse**. |
@@ -4332,35 +4248,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| type | [SensorType](#sensortype) | Yes | Type of the sensor to subscribe to, which is **SENSOR_TYPE_ID_LINEAR_ACCELERATION**. |
| callback | Callback<[LinearAccelerometerResponse](#linearaccelerometerresponse)> | Yes | One-shot callback used to return the linear acceleration sensor data. The reported data type in the callback is **LinearAccelerometerResponse**. |
| type | [SensorType](#sensortype) | Yes | Type of the sensor to subscribe to, which is **SENSOR_TYPE_ID_LINEAR_ACCELEROMETER**. |
| callback | Callback<[LinearAccelerometerResponse](#linearaccelerometerresponse)> | Yes | One-shot callback used to return the linear acceleration sensor data. The reported data type in the callback is **LinearAccelerometerResponse**. |
@@ -4381,7 +4268,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[AccelerometerUncalibratedResponse](#accelerometeruncalibratedresponse)> | Yes | One-shot callback used to return the uncalibrated acceleration sensor data. The reported data type in the callback is **AccelerometerUncalibratedResponse**. |
@@ -4392,7 +4278,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate bias: ' + data.biasZ);
}
);
```
### GRAVITY<sup>(deprecated)</sup>
...
...
@@ -4413,7 +4298,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[GravityResponse](#gravityresponse)> | Yes | One-shot callback used to return the gravity sensor data. The reported data type in the callback is **GravityResponse**. |
@@ -4421,7 +4305,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate component: '+data.z);
}
);
```
### GYROSCOPE<sup>(deprecated)</sup>
...
...
@@ -4444,7 +4327,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[GyroscopeResponse](#gyroscoperesponse)> | Yes | One-shot callback used to return the gyroscope sensor data. The reported data type in the callback is **GyroscopeResponse**. |
@@ -4452,7 +4334,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate component: '+data.z);
}
);
```
### GYROSCOPE_UNCALIBRATED<sup>(deprecated)</sup>
...
...
@@ -4475,7 +4356,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[GyroscopeUncalibratedResponse](#gyroscopeuncalibratedresponse)> | Yes | One-shot callback used to return the uncalibrated gyroscope sensor data. The reported data type in the callback is **GyroscopeUncalibratedResponse**. |
@@ -4486,7 +4366,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate bias: '+data.biasZ);
}
);
```
### SIGNIFICANT_MOTION<sup>(deprecated)</sup>
...
...
@@ -4507,13 +4386,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[SignificantMotionResponse](#significantmotionresponse)> | Yes | One-shot callback used to return the significant motion sensor data. The reported data type in the callback is **SignificantMotionResponse**. |
@@ -4536,13 +4413,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[PedometerDetectionResponse](#pedometerdetectionresponse)> | Yes | One-shot callback used to return the pedometer detection sensor data. The reported data type in the callback is **PedometerDetectionResponse**. |
@@ -4565,7 +4440,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[PedometerResponse](#pedometerresponse)> | Yes | One-shot callback used to return the pedometer sensor data. The reported data type in the callback is **PedometerResponse**. |
@@ -4591,13 +4465,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[AmbientTemperatureResponse](#ambienttemperatureresponse)> | Yes | One-shot callback used to return the ambient temperature sensor data. The reported data type in the callback is **AmbientTemperatureResponse**. |
@@ -4618,7 +4490,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[MagneticFieldResponse](#magneticfieldresponse)> | Yes | One-shot callback used to return the magnetic field sensor data. The reported data type in the callback is **MagneticFieldResponse**. |
@@ -4647,7 +4517,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[MagneticFieldUncalibratedResponse](#magneticfielduncalibratedresponse)> | Yes | One-shot callback used to return the uncalibrated magnetic field sensor data. The reported data type in the callback is **MagneticFieldUncalibratedResponse**. |
@@ -4658,7 +4527,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate bias: '+data.biasZ);
}
);
```
### PROXIMITY<sup>(deprecated)</sup>
...
...
@@ -4679,7 +4547,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[ProximityResponse](#proximityresponse)> | Yes | One-shot callback used to return the proximity sensor data. The reported data type in the callback is **ProximityResponse**. |
@@ -4705,13 +4572,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[HumidityResponse](#humidityresponse)> | Yes | One-shot callback used to return the humidity sensor data. The reported data type in the callback is **HumidityResponse**. |
@@ -4732,13 +4597,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[BarometerResponse](#barometerresponse)> | Yes | One-shot callback used to return the barometer sensor data. The reported data type in the callback is **BarometerResponse**. |
@@ -4759,13 +4622,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[HallResponse](#hallresponse)> | Yes | One-shot callback used to return the Hall effect sensor data. The reported data type in the callback is **HallResponse**. |
@@ -4792,7 +4653,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info(' Illumination: '+data.intensity);
}
);
```
### ORIENTATION<sup>(deprecated)</sup>
...
...
@@ -4813,7 +4673,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[OrientationResponse](#orientationresponse)> | Yes | One-shot callback used to return the orientation sensor data. The reported data type in the callback is **OrientationResponse**. |
console.info('The device rotates at an angle around the X axis: '+data.beta);
...
...
@@ -4821,7 +4680,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('The device rotates at an angle around the Z axis: '+data.alpha);
}
);
```
### ROTATION_VECTOR<sup>(deprecated)</sup>
...
...
@@ -4842,7 +4700,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[RotationVectorResponse](#rotationvectorresponse)> | Yes | One-shot callback used to return the rotation vector sensor data. The reported data type in the callback is **RotationVectorResponse**. |
@@ -4873,33 +4729,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| type | [SensorType](#sensortype) | Yes | Type of the sensor to subscribe to, which is **SENSOR_TYPE_ID_HEART_RATE**. |
| callback | Callback<[HeartRateResponse](#heartrateresponse)> | Yes | One-shot callback used to return the heart rate sensor data. The reported data type in the callback is **HeartRateResponse**. |
| type | [SensorType](#sensortype) | Yes | Type of the sensor to subscribe to, which is **SENSOR_TYPE_ID_HEART_BEAT_RATE**. |
| callback | Callback<[HeartRateResponse](#heartrateresponse)> | Yes | One-shot callback used to return the heart rate sensor data. The reported data type in the callback is **HeartRateResponse**. |
@@ -4918,13 +4747,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
| callback | Callback<[WearDetectionResponse](#weardetectionresponse)> | Yes | One-shot callback used to return the wear detection sensor data. The reported data type in the callback is **WearDetectionResponse**. |
@@ -5210,33 +5030,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.off.H
| type | [SensorType](#sensortype) | Yes | Type of the sensor to unsubscribe from, which is **SENSOR_TYPE_ID_HEART_RATE**. |
| callback | Callback<[HeartRateResponse](#heartrateresponse)> | Yes | One-shot callback used to return the heart rate sensor data. The reported data type in the callback is **HeartRateResponse**. |
| type | [SensorType](#sensortype) | Yes | Type of the sensor to unsubscribe from, which is **SENSOR_TYPE_ID_HEART_BEAT_RATE**. |
| callback | Callback<[HeartRateResponse](#heartrateresponse)> | Yes | One-shot callback used to return the heart rate sensor data. The reported data type in the callback is **HeartRateResponse**. |
@@ -5283,35 +5075,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.off.L
| type | [SensorType](#sensortype) | Yes | Type of the sensor to unsubscribe from, which is **SENSOR_TYPE_ID_LINEAR_ACCELERATION**. |
| callback | Callback<[LinearAccelerometerResponse](#linearaccelerometerresponse)> | Yes | Callback used to return the linear acceleration sensor data. The reported data type in the callback is **LinearAccelerometerResponse**. |
| type | [SensorType](#sensortype) | Yes | Type of the sensor to unsubscribe from, which is **SENSOR_TYPE_ID_LINEAR_ACCELEROMETER**. |
| callback | Callback<[LinearAccelerometerResponse](#linearaccelerometerresponse)> | Yes | Callback used to return the acceleration sensor data. The reported data type in the callback is **LinearAccelerometerResponse**. |