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 under the folder src/main/assets for Android and in ios/Frameworks and the Resources folder for iOS. Installation is transparent to the user; the file is simply added to the respective platform projects during plugin installation. See implementation example:
resourcesPath: "fphi-selphid-widget-resources-sdk.zip"3.2 ShowResultAfterCapture
type: boolean
Indicates whether to display a screen with the captured document image after the analysis process. On this screen, the user can repeat the capture process if the resulting document image is incorrect. See implementation example:
showResultAfterCapture: false3.3 ScanMode
type: SelphIDScanMode
This enum is defined in the class SelphIDScanMode, in the file fphi_sdkmobile_selphid_scan_mode.dart. It specifies the OCR scanning mode for documents. Depending on the selected mode, several types of documents or one specific type will be scanned and searched for. There are three modes:
SelphIDScanMode.CAP_MODE_GENERIC: Generic mode, which allows scanning any type of document, regardless of country or document type. The results of this mode are less precise than those of the following modes, but it allows scanning several standard documents.
SelphIDScanMode.CAP_MODE_SEARCH: Search mode allows you to use a whitelist and blacklist, and searches for documents that meet those conditions. These conditions are specified in the "specificData" variable. This mode narrows the search by limiting the number of templates, making it much more precise than generic mode.
SelphIDScanMode.CAP_MODE_SPECIFIC: Searches for a specific document. These conditions are specified in the "specificData" property described below.
See implementation example:
scanMode: SelphIDScanMode.CAP_MODE_SEARCH;3.4 SpecificData
type: string
This property lets you define which documents will be scanned during the process if the scanning mode (scanMode) is set to GenericMode, SpecificMode, or SearchMode.
An example configuration for scanning all documents with Spanish nationality would be:
3.5 FullScreen
type: boolean
Specifies whether the widget should start in full-screen mode, hiding the status bar.
3.6 Locale
type: string
A string that lets you change the widget's locale and language. Examples of possible values include:
“es” for Spanish.
“en” for English.
“fr” for French.
Ultimately, the value depends on the name in the strings.xml file for the language you want to select (strings-es.xml, strings-en.xml, strings-fr.xml).
In the resource ZIP file, located in the strings folder, you can add the strings-xx.xml files corresponding to each locale you want to add to 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: Specifies that identity documents or cards will be captured.
DT_Passport: Specifies that passports will be captured. (You also need to set scanMode to SelphIDScanMode.Generic)
DT_DriverLicense: Specifies that driver's licenses will be captured.
DT_ForeignCard: Specifies that foreign nationals' identity cards will be captured.
DT_Custom: Covers documents that do not fall into any of the above categories.
tokenImageQuality
type: double
Specifies the compression quality of tokenFaceImage.
generateRawImages
type: boolean
This property configures the widget to return the full camera image used to capture the document:
rawFrontDocument: Unprocessed front image of the document.
rawBackDocument: Unprocessed back image of the document.
tokenRawFrontDocument: Tokenized version of the unprocessed front image of the document.
tokenRawBackDocument: Tokenized version of the unprocessed back image of the document.
timeout
type: SelphIDTimeout
This enum 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
Specifies whether to launch the widget in Tutorial mode. This displays the widget's tutorial beforehand, but WITHOUT performing the subsequent capture process. Useful when you want to display the tutorial on its own.
videoFilename
type: string
Sets the absolute path of the filename in which a video of the capture process will be recorded. The application is responsible for requesting any necessary permissions from the phone if the path requires additional permissions. By default, the component will not record anything unless a file path is specified using this method.
documentModels
type: string
This property lets you configure the document models that the widget will attempt to capture by providing an XML-formatted string. By default, the model definitions can be found in a models .xml file inside the resources .zip. This property allows an application to update and replace the component’s current document models at runtime.
translationsContent
type: string
This property lets you configure the widget’s current localization by providing an XML-formatted string. By default, the localization definition can be found in an internal translations folder inside the resources .zip. This property allows an application to update and replace the component’s current localization at runtime.
viewsContent
type: string
This property lets you configure the current component’s views by providing an XML-formatted string. By default, the model definition can be found in a file named widget.xml inside the resources .zip. This property allows an application to update and replace the layout of the component’s internal screens at runtime.
showPreviousTip
type: boolean
Displays a pre-launch screen with information about the process to be carried out and a start button.
Last updated