SelphID Configuration
List of component configuration parameters
resourcesPath
type: string
Sets the name of the resource file that the Widget will use for its graphical configuration. This file is customizable and is located in the plugin in the folder src/main/assets for Android and in ios/Frameworks and from the Resources folder for iOS. Its installation is transparent to the user; it will simply be added to the projects of the respective platforms during the plugin installation. See implementation example:
resourcesPath: "fphi-selphid-widget-resources-sdk.zip"3.2 ShowResultAfterCapture
type: boolean
Indicates whether or not to show a screen with the captured image of the document after the analysis process. On this screen, the user is given the possibility to repeat the capture process if the image obtained from the document was not correct. See implementation example:
showResultAfterCapture: false3.3 ScanMode
type: SelphIDScanMode
This enum is defined in the class SelphIDScanMode, inside the file fphi_sdkmobile_selphid_scan_mode.dart. It indicates the OCR scanning mode of the documents. Depending on the choice, several types of documents or one specific document will be scanned and searched. This mode can be of three types:
SelphIDScanMode.CAP_MODE_GENERIC: The generic mode that allows any type of document to be scanned regardless of the country or document type. The result of this mode is not as accurate as the following ones, but it allows several standard documents to be scanned.
SelphIDScanMode.CAP_MODE_SEARCH: The search mode will allow the use of a whitelist and blacklist, and will search the documents that meet those conditions. These conditions are indicated in the "specificData" variable. In this way, the search is limited by reducing the number of templates, making the search much more fine-tuned than in the generic case.
SelphIDScanMode.CAP_MODE_SPECIFIC: Search for a specific document. These conditions are indicated in the "specificData" property shown below.
See implementation example:
scanMode: SelphIDScanMode.CAP_MODE_SEARCH;3.4 SpecificData
type: string
This property allows defining which documents will be scanned during the process, in case the scan mode (scanMode) is declared as GenericMode, SpecificMode or SearchMode.
An example configuration that allows all Spanish nationality documents to be scanned would be the following:
3.5 FullScreen
type: boolean
Sets whether the Widget should start in full-screen mode, hiding the status bar.
3.6 Locale
type: string
It is a string that allows changing the Widget's localization and language. Examples of values it can have are the following:
“es” for Spanish.
“en” for English.
“fr” for French.
Ultimately, it will depend on the name that appears in the strings.xml file for the language you want to select (strings-es.xml, strings-en.xml, strings-fr.xml).
In the resources zip, which is located inside the strings folder, the corresponding strings-xx.xml files can be added for each localization that needs to be incorporated into the Widget.
SelphIDDocumentType
type: string
This enum is defined in the file fphi_sdkmobile_selphid_document_type.dart. Specified in the enum SelphIDDocumentType:
DT_IDCard: Establishes that identity documents or cards will be captured.
DT_Passport: Establishes that passports will be captured. (Additionally, the scanMode will have to be set to SelphIDScanMode.Generic)
DT_DriverLicense: Establishes that driver's licenses will be captured.
DT_ForeignCard: Establishes that foreign identity cards will be captured.
DT_Custom: Encompasses documents that do not fall into any of the previous categories.
tokenImageQuality
type: double
Specifies the compression quality of tokenFaceImage.
generateRawImages
type: boolean
This property configures the Widget to return the full camera image that was used to capture the document:
rawFrontDocument: Front image of the raw document.
rawBackDocument: Back image of the raw document.
tokenRawFrontDocument: Tokenized of the raw front image of the document.
tokenRawBackDocument: Tokenized of the raw back image of the document.
timeout
type: SelphIDTimeout
This is an enum that defines the timeout for capturing one side of the document. It has 4 possible values:
SelphIDTimeout.Short: 15 seconds.
SelphIDTimeout.Medium: 20 seconds.
SelphIDTimeout.Long: 25 seconds.
SelphIDTimeout.VeryLong: 60 seconds.
tutorialOnly
type: boolean
Sets whether the Widget should be launched in Tutorial mode. This allows the previous Widget tutorial to be shown, but WITHOUT carrying out the subsequent capture process. Useful in case the tutorial is to be shown in isolation.
videoFilename
type: string
This is an advanced property, and in most cases it is not necessary to modify it. Incorrect use can cause incorrect operation of the component.
Sets the absolute path of the file name where a video of the capture process will be recorded. The application is responsible for requesting the necessary permissions from the phone in case that path requires additional permissions. By default, the component will not perform any recording process unless a file path is specified by this method.
documentModels
type: string
This is an advanced property, and in most use cases it is not necessary to modify it. Incorrect use can cause incorrect operation of the component.
This property allows, through a string in xml format, configuring the document models that the Widget will try to capture. The definition of this model can be found, by default, in a models .xml inside the resources .zip. With this property, an application can update and replace, at runtime, the current document models of the component.
translationsContent
type: string
This is an advanced property, and in most use cases it is not necessary to modify it. Incorrect use can cause incorrect operation of the component.
This property allows, through a string in xml format, configuring the current localization of the Widget. The definition of this model can be found, by default, in an internal translations folder inside the resources .zip. With this property, an application can update and replace, at runtime, the current localization of the component.
viewsContent
type: string
This is an advanced property, and in most use cases it is not necessary to modify it. Incorrect use can cause incorrect operation of the component.
This property allows, through a string in xml format, configuring the views of the current component. The definition of this model can be found, by default, in a file called widget.xml inside the resources .zip. With this property, an application can update and replace, at runtime, the layout of the component's internal screens.
showPreviousTip
type: boolean
Displays a pre-launch screen with information about the process to be carried out and a start button.
Last updated