> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-mobile/android-sdk/componentes-modulos/conexion-con-plataforma.md).

# Platform connection

## Introduction <a href="#id-1-introduccion" id="id-1-introduccion"></a>

Events are sent to the platform using the ***Tracking Component***.

It is responsible for tracking and monitoring the information collected while operations are running. You can track this data in real time on the **Platform**, while the process is running on the client’s device.

Unlike the other components, this component does not work independently; it works across the other components installed in the *SDKMobile*.

The [Simplified Launch](https://docs.facephi.com/docs.facephi-en/sdks/sdk-mobile/android-sdk/inicializacion/lanzamiento-simplificado.md) section describes the steps required for basic SDK integration. This section provides information about launching this component.

***

## Dependency <a href="#id-2-dependencia" id="id-2-dependencia"></a>

The component’s specific dependency is:

```kts
implementation "com.facephi.androidsdk:tracking_component:$version"
```

***

## Available controllers <a href="#id-3-controladores-disponibles" id="id-3-controladores-disponibles"></a>

<table data-header-hidden><thead><tr><th width="239.2734375"></th><th></th></tr></thead><tbody><tr><td><strong>Controller</strong></td><td><strong>Description</strong></td></tr><tr><td>TrackingController</td><td>Main tracking controller</td></tr><tr><td>TrackingErrorController</td><td>Controller for <strong>managing</strong> any <strong>errors</strong> that occur</td></tr><tr><td>ExtraDataController</td><td>Controller for retrieving <strong>ExtraData</strong> which enables <strong>communication</strong> from the client to the server with <strong>SelphIDSdk</strong> installed.</td></tr></tbody></table>

***

## Simplified Launch <a href="#id-4-lanzamiento-simplificado" id="id-4-lanzamiento-simplificado"></a>

The controller must be included during SDK initialization.

```kotlin
SDKController.initSdk(
    SdkConfigurationData(
        ...
        trackingController = TrackingController(),
    )
)
```

*TrackingController* supports two optional parameters: `retryCount: Int = 3` (number of retries) and `retryDelay: Long = 1000` (initial delay between retries).

### Error handling <a href="#id-41-control-de-errores" id="id-41-control-de-errores"></a>

You can configure the callback to handle tracking errors:

```kotlin
SDKController.launch(
     TrackingErrorController {
        Napier.d("Tracking Error: ${it.name} - ${it.error} - ${it.stepType}")
     }
)
```

## Advanced information <a href="#id-5-informacion-avanzada" id="id-5-informacion-avanzada"></a>

### Additional Controllers <a href="#id-51-controladores-adicionales" id="id-51-controladores-adicionales"></a>

#### **ExtraDataController**

This controller (*ExtraDataController*) lets you obtain an identifier for the current operation. This data will be sent to the backend, where the relevant checks will be performed.

The call to obtain extraData, **requires information about the operation in progress,** which **means** that a **must have been performed** previously: ***newOperation***.

```kotlin
val result = SDKController.launch(
    ExtraDataController()
)
when (result) {
    is SdkResult.Success -> logs.add("ExtraData: OK")
    is SdkResult.Error -> logs.add(
        "ExtraData: KO - ${result.error.name}"
    )
}
```

On success, `result.data` is a *TrackingResult* with a single field, `result` (String) containing the Tokenized ExtraData. Errors are returned as *TrackingError*.

### Receiving errors <a href="#id-52-recepcion-de-errores" id="id-52-recepcion-de-errores"></a>

For errors, we have the TrackingError class. The class returns 3 fields:

* name: String containing the error name
* error: Additional information, if needed
* stepType: SDK component where the event sending failed

List of errors:

* **APPLICATION\_CONTEXT\_ERROR**: Error initializing the context
* **ASSET\_LINK**: Error sending the asset link
* **ASSET\_UPLOAD**: Error uploading the asset
* **COMPONENT\_LICENSE\_ERROR**: Component License missing or invalid
* **CUSTOMER\_ID**: Error retrieving or validating the customer ID
* **DEVICE\_EVENT\_ERROR**: Failure during a device-related event
* **EMPTY\_LICENSE**: License data is empty or missing
* **FLOW**: Error during the execution Flow
* **INITIALIZATION\_ERROR**: General initialization failure
* **INIT\_IDS\_ERROR**: Error generating or assigning IDs during initialization
* **INIT\_OPERATION**: Operation failed during the initialization phase
* **LICENSE\_ERROR**: Invalid or corrupted license
* **MANAGER\_NOT\_INITIALIZED**: Attempted to use the manager without initializing it
* **NETWORK\_CONNECTION**: Network connection problem
* **NETWORK\_ERROR**: Generic network failure
* **NO\_OPERATION\_CREATED\_ERROR**: No operation was created when one was expected
* **OCR\_DATA**: Error processing OCR data
* **OPERATION\_NOT\_CREATED**: The expected operation was not generated
* **OPERATION\_ID**: Invalid or missing operation ID
* **SESSION\_ID**: Error with session identification
* **SIGNATURE\_RESULT**: Failure in the signing process or result
* **STEP\_CHANGE**: Unexpected or invalid step transition
* **STEP\_RESULT\_CANCELLED**: The step was unexpectedly canceled
* **STEP\_RESULT\_ERROR**: The step ended with an error
* **STEP\_RESULT\_EXPIRED**: The step result expired before completion
* **STEP\_RESULT\_SUCCEEDED**: The step succeeded but generated an unexpected problem
* **TOKEN\_ERROR**: Missing, expired, or invalid Token
* **ADVANCED\_TRACKING\_UPLOAD**: Failed to upload advanced tracking data
* **TENANT\_ID\_EMPTY\_ERROR**: The tenant ID was empty or missing
* **ADVANCED\_TRACKING\_SERIALIZATION\_ERROR**: Error serializing advanced tracking data
* **ADVANCED\_TRACKING\_VALIDATION\_ERROR**: Tracking data validation failed
* **TOKENIZER\_ERROR**: Error during the tokenization process
* **ID\_CAPTURE**: Error in the Document Capture event
* **FINGER\_CAPTURE**: Error in the Fingerprint Capture event
* **NFC\_CAPTURE**: Error in the NFC capture event
* **SELFIE\_CAPTURE**: Error in the Face Capture event
* **VIDEO\_ID\_CAPTURE**: Error in the video identification capture event
* **COORDINATES**: Error with the coordinates
* **ADVANCED\_TRACKING\_ERROR**: General advanced Tracking error
* **ASSET\_URL\_UPLOAD**: Error uploading the asset via URL
* **ASSET\_NOT\_FOUND**: Asset not found
* **EVENT\_NOT\_FOUND**: Event not found
* **STEP\_NOT\_FOUND**: Step not found
* **ENVIRONMENT\_ERROR**: Environment-related error
* **FILE\_CAPTURE\_ERROR**: Error in the file capture event
* **TERMS\_AND\_CONDITIONS**: Error in the terms and conditions event
