# 3. SDK Features

#### Enable Liveness detection <a href="#user-content-enable-liveness-detection" id="user-content-enable-liveness-detection"></a>

For enable/disable liveness detection, use this:

```kotlin
 FTechEkycManager.setEnableLiveness(true);
```

**Create transaction**

* Used to create transaction for Ekyc execution session
* When successful transaction creation, the SDK returns a model transaction data which leads to the `onSuccess()` callback. Handling create transaction successfully here.
* When creating transaction fails, it will be processed at callback `onFail()`.

```kotlin
FTechEkycManager.createTransaction(new IFTechEkycCallback<TransactionData>() {
            @Override
            public void onSuccess(TransactionData info) {

            }

            @Override
            public void onFail(APIException error) {

            }

            @Override
            public void onCancel() {

            }
        });
```

**Get process transaction**

* Used to get the Ekyc process of a transaction

| Param         | Type   | Description    |
| ------------- | ------ | -------------- |
| transactionId | String | Transaction id |

* When the get process transaction is successful, the SDK returns a model process transaction data resulting in the `onSuccess()` callback. Handling get process transaction successfully here.
* When get process transaction fails, it will be processed at callback `onFail()`.

```kotlin
FTechEkycManager.getProcessTransaction(transactionId, new IFTechEkycCallback<TransactionProcessData>() {
            @Override
            public void onSuccess(TransactionProcessData info) {
                
            }

            @Override
            public void onFail(APIException error) {
                
            }

            @Override
            public void onCancel() {
                
            }
        });
```

**Upload Photo (Normal detection)**

* Used to upload photos of documents, face for Ekyc

| Param       | Type          | Description                                                                                                 |
| ----------- | ------------- | ----------------------------------------------------------------------------------------------------------- |
| pathImage   | String        | Image path local                                                                                            |
| captureType | CAPTURE\_TYPE | Orientation images include the following types: CAPTURE\_TYPE.FRONT, CAPTURE\_TYPE.BACK, CAPTURE\_TYPE.FACE |

* When the photo upload is successful, the SDK returns a model capture data resulting in the `onSuccess()` callback. Handling photo upload successfully here.
* When uploading photo fails, it will be handled at callback `onFail()`.

```kotlin
 FTechEkycManager.uploadPhoto(pathImage, captureType, new IFTechEkycCallback<CaptureData>() {
            @Override
            public void onSuccess(CaptureData info) {
            
            }

            @Override
            public void onFail(APIException error) {
            
            }

            @Override
            public void onCancel() {
            
            }
        });
```

**Face Matching**

* Use this method to get ORC scan information

`FaceMatchingData`

| Param     | Type     | Description      |
| --------- | -------- | ---------------- |
| sessionId | String   | Session id       |
| cardInfo  | CardInfo | Card information |

`CardInfo`

| Param          | Type   | Description     |
| -------------- | ------ | --------------- |
| id             | String | id card         |
| birthDay       | String | birth day       |
| birthPlace     | String | birth place     |
| cardType       | String | card type       |
| gender         | String | gender          |
| issueDate      | String | issue date      |
| issuePlace     | String | issue place     |
| name           | String | full name       |
| nationality    | String | nationality     |
| originLocation | String | origin location |
| passportNo     | String | passport no     |
| recentLocation | String | recent location |
| validDate      | String | valid date      |
| feature        | String | feature         |
| nation         | String | nation          |
| mrz            | String | mrz             |

* When face matching is successful, the SDK returns a model face matching data resulting in the `onSuccess()` callback. Handling face matching successfully here.
* When face matching fails, it will be handled at the callback `onFail()`.

```kotlin
       FTechEkycManager.faceMatching(new IFTechEkycCallback<FaceMatchingData>() {
           @Override
           public void onSuccess(FaceMatchingData info) {
           }

           @Override
           public void onFail(APIException error) {
           }

           @Override
           public void onCancel() {
           }
       })
```

#### Liveness detection <a href="#user-content-liveness-detection" id="user-content-liveness-detection"></a>

* Using bitmap image to check face position

```kotlin
FTechEkycManager.detectFacePose(bitmap, FACE_POSE.UP, new IFTechEkycCallback<Boolean>() {
            @Override
            public void onSuccess(Boolean info) {
                
            }

            @Override
            public void onFail(APIException error) {
          
            }

            @Override
            public void onCancel() {
               
            }
        });
```

**Submit info**

* Use this method to submit information

`NewSubmitInfoRequest`

| Param          | Type           | Description      |
| -------------- | -------------- | ---------------- |
| cardInfoSubmit | CardInfoSubmit | Information card |
| preProcessId   | String         | Session id       |

`CardInfoSubmit`

| Param          | Type   | Description     |
| -------------- | ------ | --------------- |
| id             | String | id card         |
| birthDay       | String | birth day       |
| birthPlace     | String | birth place     |
| cardType       | String | card type       |
| gender         | String | gender          |
| issueDate      | String | issue date      |
| issuePlace     | String | issue place     |
| name           | String | full name       |
| nationality    | String | nationality     |
| originLocation | String | origin location |
| passportNo     | String | passport no     |
| recentLocation | String | recent location |
| validDate      | String | valid date      |
| feature        | String | feature         |
| nation         | String | nation          |
| mrz            | String | mrz             |

* After submitting the info successfully, the SDK returns a status leading to the `onSuccess()` callback. Handling submit info successfully here.
* When submitting information fails, it will be handled at the callback `onFail()`.

```kotlin
FTechEkycManager.submitInfo(submitInfoRequest, new IFTechEkycCallback<Boolean>() {
           @Override
           public void onSuccess(Boolean info) {
           }

           @Override
           public void onFail(APIException error) {
           }

           @Override
           public void onCancel() {
           }
       });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ftech.gitbook.io/ekyc-sdk/android-ekyc-sdk/3.-sdk-features.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
