> 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 done with the ***Tracking Component***.

It is responsible for tracking and monitoring the information obtained during the execution of the operations. Real-time tracking 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 independently; it works transversally to the rest of the components installed in the *SDKMobile*.

In the section of [Simplified Launch](/docs.facephi-en/sdks/sdk-mobile/android-sdk/inicializacion/lanzamiento-simplificado.md) the necessary steps for the basic SDK Integration 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 to <strong>manage</strong> the possible <strong>errors</strong> that occur</td></tr><tr><td>ExtraDataController</td><td>Controller to obtain the <strong>ExtraData</strong> which allows the <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 obtaining 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 it has **been** previously performed a ***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}"
    )
}
```

### Error reception <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 error name
* error: Additional information if necessary
* stepType: SDK component in which 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**: Component License missing or invalid
* **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 when generating or assigning IDs during Initialization
* **INIT\_OPERATION**: Failed operation in the Initialization phase
* **LICENSE\_ERROR**: Invalid or corrupted License
* **MANAGER\_NOT\_INITIALIZED**: The manager was used 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 the session identification
* **SIGNATURE\_RESULT**: Failure in the signature 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 issue
* **TOKEN\_ERROR**: Token missing, expired or invalid
* **ADVANCED\_TRACKING\_UPLOAD**: Failure when 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 in Tracking data validation
* **TOKENIZER\_ERROR**: Error during the tokenization process
