tencent cloud

Feedback

APIs for Android

Last updated: 2023-08-16 15:38:28
    The main API classes used in the Identity Verification (App SDK) for Android are EkycHySdk, EkycHyConfig, and EkycHyCallBack. Specific APIs in these classes are described as below.

    EkycHySdk

    EkycHySdk is a class of external APIs for the Identity Verification (App SDK). The main logic is completed with this class.
    API
    Feature Description
    init()
    Initializes the SDK.
    release()
    Releases resources.
    startEkycCheck()
    Starts the identity verification process.

    init()

    public static void init(Context context)
    Feature description:
    This API is used to initialize the Identity Verification (App SDK).
    Input parameters:
    Type
    Parameter
    Description
    Context
    context
    App context information

    release()

    public static void release()
    Feature description:
    This API is used to release Identity Verification (App SDK) resources.

    startEkycCheck()

    public static void startEkycCheck(final String ekycToken, EkycHyConfig ekycHyConfig,
    EkycHyCallBack ekycHyCallBack)
    Feature description:
    This API is used to start the identity verification process.
    Input parameters:
    Type
    Parameter
    Description
    String
    ekycToken
    Token requested from the server, which is used as the unique business credential for this process
    EkycHyConfig
    ekycHyConfig
    Configuration information for starting this identity verification process
    EkycHyCallBack
    ekycHyCallBack
    API used to receive the verification result callback

    EkycHyConfig

    EkycHyConfig is the configuration entity class used during the Identity Verification (App SDK) startup, which mainly covers the following attributes:
    Type
    Name
    Description
    Default Value
    String
    licenseName
    Name of the license file applied for by client for user authorization
    Empty
    int
    verAutoTimeOut
    Timeout period for card or certificate verification
    20000 milliseconds (20 seconds)
    int
    ocrAutoTimeout
    Timeout period (milliseconds) for automatic capture in OCR_DETECT_AUTO_MANUAL mode. (Set this parameter to at least 5 seconds, and the upper limit is 30 seconds.)
    20000 milliseconds (20 seconds)
    LanguageStyle
    languageStyle
    Language setting for this process
    LanguageStyle.AUTO
    OcrModeType
    ocrModeType
    OCR mode, which can be manual, auto, or auto+manual
    OcrModeType.OCR_DETECT_MANUAL
    OcrRegionType
    ocrType
    Card type
    null

    OcrRegionType

    Type of the document to recognize
    Enumerated Value
    Description
    HK
    Hong Kong (China) identity card
    ML
    Malaysian identity card
    PhilippinesDrivingLicense
    Philippine driver's license
    PhilippinesVoteID
    Philippine voters ID card
    PhilippinesTinID
    Philippine TIN ID card
    PhilippinesSSSID
    Philippines SSS ID card
    PhilippinesUMID
    Philippines UMID card
    IndonesiaIDCard
    Indonesian identity card
    MLIDPassport
    Passport

    LanguageStyle

    Language configuration for the default identity verification page
    LanguageStyle Value
    Description
    LanguageStyle.AUTO
    Auto
    LanguageStyle.ENGLISH
    English
    LanguageStyle.SIMPLIFIED_CHINESE
    Simplified Chinese
    LanguageStyle.TRADITIONAL_CHINESE
    Traditional Chinese

    OcrModeType

    OCR mode
    OcrModeType Value
    Description
    OCR_DETECT_MANUAL
    Manual mode
    OCR_DETECT_AUTO
    Auto mode
    OCR_DETECT_AUTO_MANUAL
    Auto+Manual mode

    EkycHyCallBack

    EkycHyCallBack is a listener class used to receive the result of the identity verification process.
    /**
    * Identity verification result callback class
    */
    public interface EkycHyCallBack {
       /**
        * Result information on successful recognition
        *
        * @param result: Result data
        */
       void onSuccess(EkycHyResult result);
       /**
        * Information on failed identity verification
        *
        * @param errorCode: Error code
        @param errorMsg: Error message
        * @param ekycToken: The token of this process
        */
       void onFail(int errorCode, String errorMsg, String ekycToken);
    }
    Here, EkycHyResult is the result object returned after a successful process.

    EkycHyResult

    EkycHyResult is the result object returned after the identity verification process succeeds.
    Type
    Name
    Description
    Default Value
    String
    ekycToken
    The token of this identity verification process, which can be used to pull key data of the process from the server
    Empty

    Error codes and descriptions

    Error Code
    Description
    12000
    The user actively canceled the operation
    12001
    The network request failed
    12002
    Error caused by OCR exception
    12003
    Exception caused by local face detection failure
    12004
    Invalid token
    12005
    Failed to perform local card or certificate verification
    12006
    Failed to initialize the Identity Verification (App SDK)
    12007
    Failed to start parameter verification
    12008
    Failed to return the identity verification result
    12009
    Failed to perform the local identity verification
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support