> 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>

Event sending to the platform is carried out with the ***Tracking Component***.

It is responsible for carrying out the tracking and monitoring of the information obtained during the execution of the operations. Real-time monitoring of this data will be possible on the **Platform**, while the process is running on the client's device.

Unlike the rest, this component does not work individually; it works transversally across the rest of the components installed in the *SDKMobile*.

In the section on [Simplified Launch](/docs.facephi-en/sdks/sdk-mobile/android-sdk/inicializacion/lanzamiento-simplificado.md) the steps necessary for the basic integration of the SDK are detailed. This section adds the information for the launch of this component.

***

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

The specific dependency for the component 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> possible <strong>errors</strong> that occur</td></tr><tr><td>ExtraDataController</td><td>Controller for obtaining the <strong>ExtraData</strong> that allows <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(
    ...
    trackingController = TrackingController(),
)
```

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

The callback can be configured to control 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*) allows you to 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 the ExtraData, **needs the information of the current operation,** which **requires** that **a** previous ***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}"
    )
}
```

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

In the error section, we will have the TrackingError class. The class will return 3 fields:

* name: String with the name of the error
* error: Additional information in case it is needed
* stepType: SDK component where the event sending failed

List of errors:

* **APPLICATION\_CONTEXT\_ERROR**: Error in context initialization
* **ASSET\_LINK**: Error when sending the resource link
* **ASSET\_UPLOAD**: Error during resource upload
* **COMPONENT\_LICENSE\_ERROR**: Missing or invalid component License
* **CUSTOMER\_ID**: Error when obtaining or validating the customer ID
* **DEVICE\_EVENT\_ERROR**: Failure during a device-related event
* **EMPTY\_LICENSE**: Empty or nonexistent License data
* **FLOW**: Error during the execution Flow
* **INITIALIZATION\_ERROR**: General failure in Initialization
* **INIT\_IDS\_ERROR**: Error generating or assigning IDs during Initialization
* **INIT\_OPERATION**: Failed operation in the Initialization phase
* **LICENSE\_ERROR**: Invalid or corrupted License
* **MANAGER\_NOT\_INITIALIZED**: An attempt was made to use the manager without initializing it
* **NETWORK\_CONNECTION**: Problem with the network connection
* **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 cancelled
* **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**: Failure uploading 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**: Failure validating tracking data
* **TOKENIZER\_ERROR**: Error during the tokenization process
