> For the complete documentation index, see [llms.txt](https://docs.1kosmos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1kosmos.com/mobile-sdk/native/android/api-reference/classes/liveidscannerhelper.md).

# LiveIDScannerHelper

**public class** LiveIDScannerHelper extends **Object**

↳ **package** com.onekosmos.blockid.sdk.cameramodule.liveID

***

The LiveIDScannerHelper class is a helper class for the Live ID feature.

### Constructors

**public** LiveIDScannerHelper(@NonNull Context context, @NonNull BIDScannerView bidLiveIDScannerView, View scannerOverlay, @NonNull ILiveIDResponseListener liveIDResponseListener)

* Creates an object of LiveIDScannerHelper.

| Parameters             |                                                                                                           |
| ---------------------- | --------------------------------------------------------------------------------------------------------- |
| context                | **Context**: Application's context on top of which the Live ID scanning feature will start.               |
| bidLiveIDScannerView   | BIDScannerView: A custom view to be provided by application. This is generally used for UI customization. |
| scannerOverlay         | View: An overlay to be placed on top of BIDScannerView object.                                            |
| liveIDResponseListener | **ILiveIDResponseListener**: The block to execute after the response is received.                         |

***

**public** LiveIDScannerHelper(@NonNull Context context, @NonNull BIDScannerView bidLiveIDScannerView, View scannerOverlay, @NonNull FacePresenceLevel facePresenceLevel, @NonNull ILiveIDResponseListener liveIDResponseListener)

* Creates an object of LiveIDScannerHelper with FacePresenceLevel passed to it.

| Parameters             |                                                                                                               |
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
| context                | **Context**: Application's context on top of which the Live ID scanning feature will start.                   |
| bidLiveIDScannerView   | **BIDScannerView**: A custom view to be provided by application. This is generally used for UI customization. |
| scannerOverlay         | **View**: An overlay to be placed on top of BIDScannerView object.                                            |
| facePresenceLevel      | FacePresenceLevel: Can be set as LOW, MEDIUM or HIGH depending upon restrictions required for face detection. |
| liveIDResponseListener | **ILiveIDResponseListener**: The block to execute after the response is received.                             |

***

### Method Summary

| Parameters |                                                                                                                                        |                                                                                                                                                                                                                                                                                 |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **void**   | startLiveIDScanning(@Nullable String mobileSessionID, @Nullable String mobileDocumentID)                                               | Starts the LiveID scanning. Liveness check performed using default dvcID set against License key.                                                                                                                                                                               |
| **void**   | startLiveIDScanning(String dvcID, @Nullable String mobileSessionID, @Nullable String mobileDocumentID)                                 | Starts the LiveID scanning with the given dvcID (Document Verification Connector Identifier). Liveness check performed using given dvcID.                                                                                                                                       |
| **void**   | startLiveIDScanning(boolean isWithoutLivenessCheck, @Nullable String mobileSessionID, @Nullable String mobileDocumentID)               | <p>Starts the LiveID scanning. Liveness check performed using default dvcID set against License key.<br>If the <strong>Pass isWithoutLivenessCheck</strong> parameter is set to true, SDK will not perform liveness check on image.</p>                                         |
| **void**   | startLiveIDScanning(String dvcID, boolean isWithoutLivenessCheck, @Nullable String mobileSessionID, @Nullable String mobileDocumentID) | <p>Starts the LiveID scanning with the given dvcID (Document Verification Connector Identifier). Liveness check performed using given dvcID.<br>If the <strong>Pass isWithoutLivenessCheck</strong> parameter is set to true, SDK will not perform liveness check on image.</p> |
| **void**   | stopLiveIDScanning                                                                                                                     | Stops Live ID scanning.                                                                                                                                                                                                                                                         |

### Method Detail

#### startLiveIDScanning

public void startLiveIDScanning(@Nullable String mobileSessionID, @Nullable String mobileDocumentID)

* Starts the LiveID scanning in default mode. Liveness check performed using default dvcID set against License key.

| Parameters       |                                                                                                  |
| ---------------- | ------------------------------------------------------------------------------------------------ |
| mobileSessionID  | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes.  |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |

***

#### startLiveIDScanning

public void startLiveIDScanning(String dvcID, @Nullable String mobileSessionID, @Nullable String mobileDocumentID)

* Starts the LiveID scanning with the given dvcID (Document Verification Connector Identifier). Liveness check performed using give dvcID.

| Parameters       |                                                                                                  |
| ---------------- | ------------------------------------------------------------------------------------------------ |
| dvcID            | String: Document Verification Connector Identifier.                                              |
| mobileSessionID  | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes.  |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |

***

#### startLiveIDScanning

public void startLiveIDScanning(boolean isWithoutLivenessCheck, @Nullable String mobileSessionID, @Nullable String mobileDocumentID)

Starts the LiveID scanning. Liveness check performed using default dvcID set against License key. If the **Pass isWithoutLivenessCheck** is set to true, SDK will not perform liveness check on image

| Parameter              |                                                                                                  |
| ---------------------- | ------------------------------------------------------------------------------------------------ |
| isWithoutLivenessCheck | boolean: Pass true so that SDK will not perform liveness check on image.                         |
| mobileSessionID        | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes.  |
| mobileDocumentID       | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |

***

#### startLiveIDScanning

public void startLiveIDScanning(String dvcID, @Nullable String mobileSessionID, boolean isWithoutLivenessCheck, @Nullable String mobileDocumentID)

* Starts the LiveID scanning with the given dvcID (Document Verification Connector Identifier). Liveness check performed using given dvcID.
* If the Pass isWithoutLivenessCheck parameter is set to true, the Liveness check gets bypassed.

| Parameter              |                                                                                                  |
| ---------------------- | ------------------------------------------------------------------------------------------------ |
| dvcID                  | String: Document Verification Connector Identifier.                                              |
| isWithoutLivenessCheck | boolean: Pass true so that SDK will not perform liveness check on image.                         |
| mobileSessionID        | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes.  |
| mobileDocumentID       | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |

***

#### stopLiveIDScanning

**public void** stopLiveIDScanning()

* Stops Live ID scanning.

***

### Interface Summary

| Parameter               |                                                                                                                                           |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| ILiveIDResponseListener | Callback for event when LiveID is captured, face not found, face is not aligned, and multiple faces found. liveIdDidDetectErrorInScanning |

***

#### Method Summary

| Parameters |                                                                                                                                                                                   |                                                                             |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| **void**   | onFaceFocusChanged(boolean isFocused, String message, ErrorManager.ErrorResponse errorResponse)                                                                                   | Called when the user's face position changes within the scanner focus area. |
| **void**   | onLiveIDCaptured(Bitmap liveIdBitmap, String token, String livenessResult, @Nullable String mobileSessionId, @Nullable String mobileDocumentId, ErrorManager.ErrorResponse error) | Called when Live ID scanning is completed.                                  |
| **void**   | onLivenessCheckStarted()                                                                                                                                                          | Called when the Live ID scanner has started liveness check.                 |

***

**onFaceFocusChanged**

**default void** onFaceFocusChanged(**boolean** isFocused, **String** message, **ErrorManager.ErrorResponse** errorResponse)

* Called when the user's face position changes within the scanner focus area.

| Parameter     |                                                                                                                              |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| isFocused     | **boolean**: A flag that indicates if the user's face is in the focus area.                                                  |
| message       | <p><strong>String</strong>:<br>- Please align the face in the center.<br>- Face is not found.<br>- Multiple faces found.</p> |
| errorResponse | Along with messages.                                                                                                         |

***

**onLiveIDCaptured**

**void** onLiveIDCaptured(Bitmap liveIdBitmap, String token, String livenessResult, ErrorManager.ErrorResponse error)

* Called when Live ID scanning is completed.

| Parameter      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| liveIdBitmap   | **Bitmap**: An image of a person's face.                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| token          | **String**: A token that carries information about Live ID. This is used to verify if the user's Live ID is modified before storing it on the BlockID blockchain platform.                                                                                                                                                                                                                                                                                                                      |
| livenessResult | **String**: JSON String result data of Liveness check                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| error          | <p><strong>ErrorManager.ErrorResponse</strong>: An object of ErrorResponse.<br>- FACE\_IS\_NOT\_FOUND(130001, "Face is not found.")<br>- UNABLE\_TO\_DETECT\_EYES(130002, "Unable to detect eyes.")<br>- UNABLE\_TO\_DETECT\_LIPS(130003, "Unable to detect lips.")<br>- HEAD\_TURNED\_TOO\_FAR(130004, "Head turned too far.")<br>- PLEASE\_ALIGN\_THE\_FACE\_IN\_THE\_CENTER(130005, "Please align the face in the center.")<br>- MULTIPLE\_FACES\_FOUND(130006, "Multiple faces found.")</p> |

***

**onLivenessCheckStarted**

**default void** onLivenessCheckStarted()

* Called when the Live ID scanner started the liveness check.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.1kosmos.com/mobile-sdk/native/android/api-reference/classes/liveidscannerhelper.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
