| callback | AsyncCallback\<[WorkInfo](#workinfo)> | Yes | Callback used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; returns **null** otherwise.|
| callback | AsyncCallback\<[WorkInfo](#workinfo)> | Yes | Callback used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; throws an exception otherwise. |
**Error codes**
**Error codes**
...
@@ -178,7 +178,7 @@ Obtains the latest task status. This API uses a promise to return the result.
...
@@ -178,7 +178,7 @@ Obtains the latest task status. This API uses a promise to return the result.
| Promise\<[WorkInfo](#workinfo)> | Promise used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; returns **null** otherwise.|
| Promise\<[WorkInfo](#workinfo)> | Promise used to return the result. Returns the task status obtained from the **WorkSchedulerService** if the specified task ID is valid; throws an exception otherwise. |
@@ -4477,7 +4453,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4477,7 +4453,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**. |
| callback | Callback<[AccelerometerResponse](#accelerometerresponse)> | Yes | One-shot callback used to return the acceleration sensor data. The reported data type in the callback is **AccelerometerResponse**. |
@@ -4485,7 +4460,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4485,7 +4460,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate component: '+data.z);
console.info('Z-coordinate component: '+data.z);
}
}
);
);
```
```
### LINEAR_ACCELERATION<sup>(deprecated)</sup>
### LINEAR_ACCELERATION<sup>(deprecated)</sup>
...
@@ -4527,7 +4501,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4527,7 +4501,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**. |
| 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**. |
@@ -4538,7 +4511,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4538,7 +4511,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate bias: ' + data.biasZ);
console.info('Z-coordinate bias: ' + data.biasZ);
}
}
);
);
```
```
### GRAVITY<sup>(deprecated)</sup>
### GRAVITY<sup>(deprecated)</sup>
...
@@ -4559,7 +4531,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4559,7 +4531,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**. |
| callback | Callback<[GravityResponse](#gravityresponse)> | Yes | One-shot callback used to return the gravity sensor data. The reported data type in the callback is **GravityResponse**. |
@@ -4567,7 +4538,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4567,7 +4538,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate component: '+data.z);
console.info('Z-coordinate component: '+data.z);
}
}
);
);
```
```
### GYROSCOPE<sup>(deprecated)</sup>
### GYROSCOPE<sup>(deprecated)</sup>
...
@@ -4590,7 +4560,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4590,7 +4560,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**. |
| callback | Callback<[GyroscopeResponse](#gyroscoperesponse)> | Yes | One-shot callback used to return the gyroscope sensor data. The reported data type in the callback is **GyroscopeResponse**. |
@@ -4598,7 +4567,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4598,7 +4567,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate component: '+data.z);
console.info('Z-coordinate component: '+data.z);
}
}
);
);
```
```
### GYROSCOPE_UNCALIBRATED<sup>(deprecated)</sup>
### GYROSCOPE_UNCALIBRATED<sup>(deprecated)</sup>
...
@@ -4621,7 +4589,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4621,7 +4589,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**. |
| 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**. |
@@ -4632,7 +4599,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4632,7 +4599,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate bias: '+data.biasZ);
console.info('Z-coordinate bias: '+data.biasZ);
}
}
);
);
```
```
### SIGNIFICANT_MOTION<sup>(deprecated)</sup>
### SIGNIFICANT_MOTION<sup>(deprecated)</sup>
...
@@ -4653,13 +4619,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4653,13 +4619,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**. |
| 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**. |
@@ -4682,13 +4646,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4682,13 +4646,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**. |
| 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**. |
@@ -4711,13 +4673,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4711,13 +4673,11 @@ 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**. |
| callback | Callback<[PedometerResponse](#pedometerresponse)> | Yes | One-shot callback used to return the pedometer sensor data. The reported data type in the callback is **PedometerResponse**. |
@@ -4738,13 +4698,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4738,13 +4698,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**. |
| 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**. |
@@ -4765,7 +4723,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4765,7 +4723,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**. |
| 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**. |
@@ -4794,7 +4750,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4794,7 +4750,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**. |
| 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**. |
@@ -4805,7 +4760,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4805,7 +4760,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Z-coordinate bias: '+data.biasZ);
console.info('Z-coordinate bias: '+data.biasZ);
}
}
);
);
```
```
### PROXIMITY<sup>(deprecated)</sup>
### PROXIMITY<sup>(deprecated)</sup>
...
@@ -4826,13 +4780,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4826,13 +4780,11 @@ 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**. |
| callback | Callback<[ProximityResponse](#proximityresponse)> | Yes | One-shot callback used to return the proximity sensor data. The reported data type in the callback is **ProximityResponse**. |
@@ -4853,13 +4805,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4853,13 +4805,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**. |
| callback | Callback<[HumidityResponse](#humidityresponse)> | Yes | One-shot callback used to return the humidity sensor data. The reported data type in the callback is **HumidityResponse**. |
@@ -4880,13 +4830,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4880,13 +4830,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**. |
| callback | Callback<[BarometerResponse](#barometerresponse)> | Yes | One-shot callback used to return the barometer sensor data. The reported data type in the callback is **BarometerResponse**. |
@@ -4907,13 +4855,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4907,13 +4855,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**. |
| 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**. |
@@ -4940,7 +4886,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4940,7 +4886,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info(' Illumination: '+data.intensity);
console.info(' Illumination: '+data.intensity);
}
}
);
);
```
```
### ORIENTATION<sup>(deprecated)</sup>
### ORIENTATION<sup>(deprecated)</sup>
...
@@ -4961,7 +4906,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4961,7 +4906,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**. |
| 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);
console.info('The device rotates at an angle around the X axis: '+data.beta);
...
@@ -4969,7 +4913,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4969,7 +4913,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);
console.info('The device rotates at an angle around the Z axis: '+data.alpha);
}
}
);
);
```
```
### ROTATION_VECTOR<sup>(deprecated)</sup>
### ROTATION_VECTOR<sup>(deprecated)</sup>
...
@@ -4990,7 +4933,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4990,7 +4933,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**. |
| 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**. |
@@ -4999,7 +4941,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -4999,7 +4941,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
console.info('Scalar quantity: '+data.w);
console.info('Scalar quantity: '+data.w);
}
}
);
);
```
```
### HEART_RATE<sup>(deprecated)</sup>
### HEART_RATE<sup>(deprecated)</sup>
...
@@ -5039,13 +4980,11 @@ This API is deprecated since API version 9. You are advised to use [sensor.once.
...
@@ -5039,13 +4980,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**. |
| 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**. |