| class info |
| public final class AwarenessStatusCodes extends Object |
| Status codes. |
| Type | Name | Desc |
| int | AWARENESS_SUCCESS_CODE | Success. |
| int | AWARENESS_UNKNOWN_ERROR_CODE | Unknown error. |
| int | AWARENESS_BINDER_ERROR_CODE | Bind service failure caused by an empty binder. |
| int | AWARENESS_REGISTER_FAILED_CODE | Fence registration failure. |
| int | AWARENESS_TIMEOUT_CODE | Timeout 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. |
| int | AWARENESS_COUNT_LIMIT_CODE | Error 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.) |
| int | AWARENESS_FREQUENCY_LIMIT_CODE | Error 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. |
| int | AWARENESS_BARRIER_PARAMETER_ERROR_CODE | Invalid fence parameter. (An input parameter of addBarrier is incorrect.) |
| int | AWARENESS_REQUEST_ERROR_CODE | Incorrect request parameter. (An input parameter of updateBarriers is incorrect.) |
| int | AWARENESS_AGC_FILE_ERROR | Incorrect AppGallery Connect file. |
| int | AWARENESS_RESULT_INVALID_ERROR | Invalid result returned by HUAWEI Awareness Kit. For example, the returned headset status is unknown. |
| int | AWARENESS_REMOTE_EXCEPTION_ERROR | The remote exception is thrown by the bind method. |
| int | AWARENESS_WAIT_CALLBACK_CODE | Wait for the service callback. |
| int | AWARENESS_INTERFACE_INVALID | The requested API no longer provides services. |
| int | AWARENESS_NO_ENOUGH_RESOURCE | Insufficient system resources. |
| int | AWARENESS_SDK_VERSION_ERROR | Incorrect SDK version. The version cannot be earlier than 24. |
| int | AWARENESS_LOCATION_PERMISSION_CODE | The location permission in the app is forbidden. |
| int | AWARENESS_LOCATION_CORE_PERMISSION_CODE | The location permission in HUAWEI Mobile Services (APK) is forbidden. |
| int | AWARENESS_BEHAVIOR_PERMISSION_CODE | The behavior recognition permission in the app is forbidden. |
| int | AWARENESS_BLUETOOTH_PERMISSION_CODE | The app does not apply for the Bluetooth permission. |
| int | AWARENESS_LOCATION_NOCACHE_CODE | No location caches. |
| int | AWARENESS_LOCATION_NOT_AVAILABLE_CODE | HUAWEI Location Kit is unavailable. |
| int | AWARENESS_BEACON_NOT_AVAILABLE_CODE | The beacon service is unavailable. |
| int | AWARENESS_BLUETOOTH_NOT_AVAILABLE_CODE | The Bluetooth service is unavailable. |
| int | UPDATE_KIT_CODE | HUAWEI Awareness Kit needs to be updated. |
| int | UPDATE_HMS_CODE | Huawei Mobile Services (APK) needs to be updated. |
| Return type | Method name |
| String | public static String getMessage(int statusCode) |
| 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_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 |
| Method |
| public static String getMessage(int statusCode) |
| Obtains the status code. |
Parameters
| Parameter name | Parameter desc |
| statusCode | Status code constant. |
Return
| Type | desc |
| String | Status code. |