For the complete documentation index, see llms.txt. This page is also available as Markdown.

Main component

It is the most important component of the SDK, since it contains the libraries necessary for everything to work correctly.

The installation of the Core Plugin is mandatory, regardless of the products required for use and the use case that has been defined. It contains basic features for the operation of the SDK, as well as other cross-cutting and necessary features for auxiliary plugins.

Dependencies

Flutter:

dependencies:
  fphi_sdkmobile_core:
    hosted:
      name: fphi_sdkmobile_core
      url: https://facephicorp.jfrog.io/artifactory/api/pub/pub-pro-fphi/
    version: ^<version>

Android - Gradle:

api "com.facephi.androidsdk:sdk:$version"
api "com.facephi.androidsdk:core:$version"
implementation "com.facephi.androidsdk:tracking_component:$version"

iOS - CocoaPods:

s.dependency 'FPHISDKMainComponent', '~> $version'
s.dependency 'FPHISDKTrackingComponent', '~> $version'
s.dependency 'FPHISDKLicensingComponent', '~> $version'
s.dependency 'FPHISDKTokenizeComponent', '~> $version'
s.dependency 'FPHISDKStatusComponent', '~> $version'

Available methods

This component contains several methods that execute different functionalities:

Method

Description

initSession

Main controller of the component, which is responsible for validating licenses, among other things.

initOperation

Method responsible for generating a new operation. Its id is retrieved in the result object, data parameter.

getExtraData

The getExtraData method allows generating the identifiers necessary for an operation that must continue in the Facephi Validation Service (Backend).

closeSession

Before the application is destroyed, the SDK session must be closed to notify the platform of its completion.

initSession

Before any component can be used, the SDK session must be initialized. This initialization should be done as soon as possible, preferably at the start of the application. At the same time, once all operations with the SDK Mobile have been completed, the session must also be closed.

The current component can be initialized in two ways, depending on how you want to inject the license.

The new licensing method allows licenses to be managed transparently for the integrator. The license can be injected in two ways:

  • Obtaining the license through a service via a URL and API-KEY

  • Injecting the license directly as a String

In both cases, the result will be returned through a Promise, which contains an object of the class CoreResult.

Basic configuration

To launch the current component, an object must be created CoreConfigurationInitSession which will be the configuration of the component controller.

The basic configuration required for it is as follows:

Advanced component configuration

Below are all the fields that are part of this class.

Init Session Configuration

initOperation

When starting a process or flow, always the initOperation method must be called

Basic configuration

To launch the current component, an object must be created TrackingConfiguration which will be the configuration of the component controller.

The basic configuration required for it is as follows:

Advanced component configuration

Below are all the fields that are part of this class.

Init Operation Configuration

closeSession

Before the application is destroyed, the SDK session must be closed to notify the platform of its completion. For this, the following code snippet is executed:


getExtraData

The getExtraData method allows generating the identifiers necessary for an operation that must continue in the Facephi Validation Service (Backend). This situation usually occurs in cases where, once the necessary information has been obtained in the client application, that information must be sent to a specific service for subsequent validation or analysis. If the results of those processes must be tracked in the Platform, it must be able to unify the first part of the process performed on the client with the last part performed in the service, since in the end they are part of the same operation.

IDV launch

The IDV process launches a flow configured in the platform using its ID (flowID). To do this, two methods must be invoked: initFlow + startFlow.

initFlow

In this method, the necessary configuration will be set. The ID of the flow configured in the platform (flowID) and the ID of the client (customerID). See code:

To configure the flow controller, a list of the controllers for the components that will participate in the process will be created, which allows them to be initialized correctly. The order in which they are defined is not important; the flow itself will indicate the order in which they will be executed. For example:

  • setSelphiFlow: Face Capture

  • setSelphidFlow: Document Capture

Launch code:

Receiving the result

The launch of ALL the methods will return the information in CoreResult format. A correct launch can be distinguished from an incorrect one:

Core Result

Last updated