目录

Result Codes

The corresponding API is HiHealthError.

Constant Field

Value

Data Definition

Typical Scenario

SUCCESS

0

Calling succeeded.

The execution is normal.

FAILED

1

Calling failed.

1. The Huawei Health app is not installed.

2. The AIDL binding fails.

PARAM_INVALID

2

Parameter error.

The input parameters are invalid.

ERR_API_EXECEPTION

4

API calling error.

Communication with the Huawei Health app is interrupted.

ERR_DEVICE_EXCEPTION

5

Device exception.

Failed to read the device data or the device does not support the function.

ERR_HEALTH_VERSION_IS_NOT_SUPPORTED

30

Huawei Health version earlier than required.

The version of the Huawei Health app is not up to date when the new body temperature type is queried.

ERR_HEALTH_SERVICE_DISCONNECTED

31

Disconnected from the Huawei Health app.

1. After the callback is registered for fitness data, your app is disconnected from the Huawei Health app.

2. After subscribing to daily data, your app is disconnected from the Huawei Health app. A message is displayed, prompting that re-subscription is required.

ERR_HMS_UNAVAILABLE_VERSION

32

HMS Core (APK) version earlier than required.

The HMS Core (APK) version is earlier than 5.1.0.300. An update to the latest version is recommended.

ERR_REPEAT_EXCEPTION

101

Calling repeated.

The same model is used repeatedly to subscribe to daily data.

ERR_LIMIT_EXCEPTION

102

Calling limit exceeded.

The number of models used for daily data subscription exceeds 10.

ERR_DEVICE_NOT_CONNECTED

150

Device not connected.

No device is connected.

ERR_WRONG_DEVICE

151

Incorrect device types selected.

The selected device type is incorrect for the workout type.

ERR_CANCEL_SELECT_DEVICE

152

Device selection canceled.

No device is selected before a user starts a workout on a device.

ERR_PERMISSION_EXCEPTION

1001

Permission verification error.

1. Permissions are not yet granted. A reminder needs to be sent to the user to grant the related permissions.

2. The authorization has expired. You are advised to call silentSignIn again for re-authorization.

3. This API is called when the screen is locked. You are advised to call the API after the screen is unlocked.

ERR_PRIVACY_USER_DENIED

1003

App privacy agreement denied.

The user has not agreed to the privacy agreement in the Huawei Health app.

ERR_NETWORK

1004

Network request failed.

Network error occurs during the authentication of test permissions.

ERR_BLUETOOTH_NOT_ENABLED

1005

Bluetooth not enabled.

Bluetooth is not enabled when the user attempts to connect to a Bluetooth device.

ERR_LOCATION_PERMISSION_DENIED

1006

Location permission not enabled.

The location permission is not granted to the Huawei Health app when the user scans for Bluetooth devices.

ERR_STORAGE_PERMISSION_DENIED

1007

Storage permission not enabled.

The storage permission is not granted to the Huawei Health app when the user stores the activity trajectory.

ERR_BETA_SCOPE_EXCEPTION

50048

Number of beta users before applying for verification exceeds the upper limit.

The number of users with the test scopes exceeds 100.