目录

CLASS info
public class SafetyDetectStatusCode extends com.huawei.hms.common.api.CommonStatusCodes
Returns the response status code of the Safety Detect service.

Constant Summary

TypeNameDesc
intSDK_INTERNAL_ERRORAn internal error of the HMS SDK occurs.
intNETWORK_ERRORA network exception of the HMS SDK occurs.
intUNSUPPORTED_AREAThe user device area does not support the Safety Detect service.
intUNSUPPORTED_EMUI_VERSIONThe user device version does not support the Safety Detect service.
intPARAM_ERROR_EMPTYA mandatory parameter in the request is empty.
intPARAM_ERROR_INVALIDParameters failed the verification.
intAPPS_CHECK_INTERNAL_ERRORAn internal error occurs during app security check.
intURL_CHECK_INNER_ERRORAn internal error occurs during malicious URL check.
intCHECK_WITHOUT_INITThe initUrlCheck API is not called before urlCheck API call.
intURL_CHECK_THREAT_TYPE_INVALIDThe URL threat of this type cannot be detected. Only URL threats of phising and malware are supported.
intURL_CHECK_REQUEST_PARAM_INVALIDParameters for calling the urlCheck API are incorrect.
intURL_CHECK_REQUEST_APPID_INVALIDAn incorrect app ID is imported for urlCheck API call.
intDETECT_FAILFake user detection failed.
intUSER_DETECT_TIMEOUTFake user detection timed out.
intUSER_DETECT_INVALID_APPIDAn incorrect app ID is imported for userDetection API call.

Public Method Summary

Return typeMethod name
static String

getStatusCodeString(int code)

Gets details about the Safety Detect error code.

Constants

Constant
public static final int SDK_INTERNAL_ERROR

Value: 19001

An internal error of the HMS SDK occurs, for example, signature change failure on the server and internal error of the TSS.

Constant
public static final int NETWORK_ERROR

Value: 19002

A network exception of the HMS SDK occurs.

Constant
public static final int UNSUPPORTED_AREA

Value: 19003

The user device area does not support the Safety Detect service.

Constant
public static final int UNSUPPORTED_EMUI_VERSION

Value: 19202

The user device version does not support the Safety Detect service. For details about EMUIs supported by Safety Detect, please refer to EMUI Version-Dependent Features.

Constant
public static final int PARAM_ERROR_EMPTY

Value: 19150

A mandatory parameter in the request for the Safety Detect SDK is empty.

Constant
public static final int PARAM_ERROR_INVALID

Value: 19151

Parameters in the request for the Safety Detect SDK do not meet the requirements, and the parameters failed the verification.

Constant
public static final int APPS_CHECK_INTERNAL_ERROR

Value: 19401

An internal error of the API occurs, and the request for app security check failed.

Constant
public static final int URL_CHECK_INNER_ERROR

Value: 19600

An internal error of the API occurs. The request for the malicious URL check failed.

Constant
public static final int CHECK_WITHOUT_INIT

Value: 19601

The initUrlCheck API is not called before urlCheck API call.

Constant
public static final int URL_CHECK_THREAT_TYPE_INVALID

Value: 19602

The URL threat of this type cannot be detected. Only URL threats of phising and malware are supported.

Constant
public static final int URL_CHECK_REQUEST_PARAM_INVALID

Value: 19603

Parameters for calling the urlCheck API are incorrect.

Constant
public static final int URL_CHECK_REQUEST_APPID_INVALID

Value: 19604

An incorrect app ID is imported for urlCheck API call.

Constant
public static final int DETECT_FAIL

Value: 19800

Fake user detection failed.

Constant
public static final int USER_DETECT_TIMEOUT

Value: 19801

Fake user detection timed out.

Constant
public static final int USER_DETECT_INVALID_APPID

Value: 19802

An incorrect app ID is imported for userDetection API call.

Public Methods

Method
public static String getStatusCodeString (int code)
Returns the details about the error code.

Parameters

Parameter nameParameter desc
codeError code.


Return

typedesc
StringDetails about the error code.