目录

class info
public final class AwarenessStatusCodes extends Object
Status codes.

Constant Summary

TypeNameDesc
intAWARENESS_SUCCESS_CODESuccess.
intAWARENESS_UNKNOWN_ERROR_CODEUnknown error.
intAWARENESS_BINDER_ERROR_CODEBind service failure caused by an empty binder.
intAWARENESS_REGISTER_FAILED_CODEFence registration failure.
intAWARENESS_TIMEOUT_CODETimeout error. For example, one of the following events times out: fence update, time attribute obtaining, beacon status obtaining, bind service connection, and waiting for Intent.
intAWARENESS_COUNT_LIMIT_CODEError due to the access times limit. (For example, the number of times that a developer accesses the fence reaches the upper limit, which is 200.)
intAWARENESS_FREQUENCY_LIMIT_CODEError due to the access frequency limit of the fence or snapshot, which is 1000 times per hour or 20 times every 5 seconds. The total number of barriers to be registered in 5s cannot exceed 500.
intAWARENESS_BARRIER_PARAMETER_ERROR_CODEInvalid fence parameter. (An input parameter of addBarrier is incorrect.)
intAWARENESS_REQUEST_ERROR_CODEIncorrect request parameter. (An input parameter of updateBarriers is incorrect.)
intAWARENESS_AGC_FILE_ERRORIncorrect AppGallery Connect file.
intAWARENESS_RESULT_INVALID_ERRORInvalid result returned by HUAWEI Awareness Kit. For example, the returned headset status is unknown.
intAWARENESS_REMOTE_EXCEPTION_ERRORThe remote exception is thrown by the bind method.
intAWARENESS_WAIT_CALLBACK_CODEWait for the service callback.
intAWARENESS_INTERFACE_INVALIDThe requested API no longer provides services.
intAWARENESS_NO_ENOUGH_RESOURCEInsufficient system resources.
intAWARENESS_SDK_VERSION_ERRORIncorrect SDK version. The version cannot be earlier than 24.
intAWARENESS_LOCATION_PERMISSION_CODEThe location permission in the app is forbidden.
intAWARENESS_LOCATION_CORE_PERMISSION_CODEThe location permission in HUAWEI Mobile Services (APK) is forbidden.
intAWARENESS_BEHAVIOR_PERMISSION_CODEThe behavior recognition permission in the app is forbidden.
intAWARENESS_BLUETOOTH_PERMISSION_CODEThe app does not apply for the Bluetooth permission.
intAWARENESS_LOCATION_NOCACHE_CODENo location caches.
intAWARENESS_LOCATION_NOT_AVAILABLE_CODEHUAWEI Location Kit is unavailable.
intAWARENESS_BEACON_NOT_AVAILABLE_CODEThe beacon service is unavailable.
intAWARENESS_BLUETOOTH_NOT_AVAILABLE_CODEThe Bluetooth service is unavailable.
intUPDATE_KIT_CODEHUAWEI Awareness Kit needs to be updated.
intUPDATE_HMS_CODEHuawei Mobile Services (APK) needs to be updated.

Public Method Summary

Return typeMethod name
Stringpublic static String getMessage(int statusCode)

Constants

Constant
public static final int AWARENESS_SUCCESS_CODE
Success.
Constant value: 0
Constant
public static final int AWARENESS_UNKNOWN_ERROR_CODE
Unknown error.
Constant value: 10000
Constant
public static final int AWARENESS_BINDER_ERROR_CODE
Bind service failure caused by an empty binder.
Constant value: 10001
Constant
public static final int AWARENESS_REGISTER_FAILED_CODE
Barrier registration failure.
Constant value: 10002
Constant
public static final int AWARENESS_TIMEOUT_CODE
Timeout error. For example, one of the following events times out: barrier update, time attribute obtaining, beacon status obtaining, bind service connection, and waiting for intent.
Constant value: 10003
Constant
public static final int AWARENESS_COUNT_LIMIT_CODE
Error due to the access times limit. (For example, the number of times that a developer accesses the barrier reaches the upper limit, which is 200.)
Constant value: 10004
Constant
public static final int AWARENESS_FREQUENCY_LIMIT_CODE
Error due to the access frequency limit of the barrier or capture, which is 1000 times per hour or 20 times every 5 seconds. The total number of barriers to be registered in 5s cannot exceed 500.
Constant value: 10005
Constant
public static final int AWARENESS_BARRIER_PARAMETER_ERROR_CODE
Incorrect barrier parameter. (An input parameter of addBarrier is incorrect.)
Constant value: 10006
Constant
public static final int AWARENESS_REQUEST_ERROR_CODE
Incorrect request parameter. (An input parameter of updateBarriers is incorrect.)
Constant value: 10007
Constant
public static final int AWARENESS_AGC_FILE_ERROR
Incorrect AppGallery Connect file.
Constant value: 10008
Constant
public static final int AWARENESS_RESULT_INVALID_ERROR
Invalid result returned by HUAWEI Awareness Kit. (For example, the returned headset status is unknown.)
Constant value: 10009
Constant
public static final int AWARENESS_REMOTE_EXCEPTION_ERROR
The remote exception is thrown by the bind method.
Constant value: 10010
Constant
public static final int AWARENESS_WAIT_CALLBACK_CODE
Wait for the service callback.
Constant value: 10011
Constant
public static final int AWARENESS_INTERFACE_INVALID
The requested API no longer provides services.
Constant value: 10012
Constant
public static final int AWARENESS_NO_ENOUGH_RESOURCE
Insufficient system resources.
Constant value: 10013
Constant
public static final int AWARENESS_SDK_VERSION_ERROR
Incorrect SDK version. The version cannot be earlier than 24.
Constant value: 10100
Constant
public static final int AWARENESS_LOCATION_PERMISSION_CODE
The location permission in the app is forbidden.
Constant value: 10101
Constant
public static final int AWARENESS_LOCATION_CORE_PERMISSION_CODE
The location permission in Huawei Mobile Services (APK) is forbidden.
Constant value: 10102
Constant
public static final int AWARENESS_BEHAVIOR_PERMISSION_CODE
The behavior recognition permission in the app is forbidden.
Constant value: 10103
Constant
public static final int AWARENESS_BLUETOOTH_PERMISSION_CODE
The app does not apply for the Bluetooth permission.
Constant value: 10104
Constant
public static final int AWARENESS_LOCATION_NOCACHE_CODE
No location caches.
Constant value: 10200
Constant
public static final int AWARENESS_LOCATION_NOT_AVAILABLE_CODE
HUAWEI Location Kit is unavailable.
Constant value: 10201
Constant
public static final int AWARENESS_BEACON_NOT_AVAILABLE_CODE
The beacon service is unavailable.
Constant value: 10300
Constant
public static final int AWARENESS_BLUETOOTH_NOT_AVAILABLE_CODE
The Bluetoothservice is unavailable.
Constant value: 10400
Constant
public static final int UPDATE_KIT_CODE
HUAWEI Awareness Kit needs to be updated.
Constant value: 1212
Constant
public static final int UPDATE_HMS_CODE
Huawei Mobile Services (APK) needs to be updated.
Constant value: 907135003

Public Methods

Method
public static String getMessage(int statusCode)
Obtains the status code.

Parameters

Parameter nameParameter desc
statusCodeStatus code constant.


Return

Typedesc
StringStatus code.