The Results module shows a screen summarizing the data captured during onboarding, including OCR fields, captured images, and identity scores. It returns an overall user score.
For an overview of this module and how it works, see Show Results.
How you use this module depends on your integration pattern. In Patterns 1 and 2, you add the module to a FlowConfig in code as shown on this page. In Pattern 3, you define your modules and configuration in Dashboard as a Flow or Workflow and reference it by ID with startFlow() or startWorkflow() as shown on Run Flows Configured in Dashboard.
Results is not available in Capture-Only Mode.
Add Results
Add an ID Scan or QR Scan module before Results. If you want to include Selfie Scan in your flow, add it before Results as well. Results depends on the data those earlier steps produce, and the SDK validates this ordering.
Add the module with one of the
addResultsoverloads:// Default fetch mode (ACCURATE) flowConfigBuilder.addResults() // Or choose how results are fetched flowConfigBuilder.addResults(IncodeWelcome.IDResultsFetchMode.FAST)// Default fetch mode (ACCURATE) flowConfigBuilder.addResults(); // Or choose how results are fetched flowConfigBuilder.addResults(IncodeWelcome.IDResultsFetchMode.FAST);
Example
The example below adds ID Scan and Selfie Scan before Results, and reads the score and status from onResultsShown().
val flowConfig = FlowConfig.Builder()
.addID()
.addSelfieScan()
.addResults()
.build()
IncodeWelcome.getInstance().startOnboarding(
activity,
flowConfig,
object : IncodeWelcome.OnboardingListener() {
override fun onResultsShown(userScoreResult: UserScoreResult) {
val score = userScoreResult.overallScore
val status = userScoreResult.overallStatus
}
}
)
FlowConfig flowConfig = new FlowConfig.Builder()
.addID()
.addSelfieScan()
.addResults()
.build();
IncodeWelcome.getInstance().startOnboarding(
activity,
flowConfig,
new IncodeWelcome.OnboardingListener() {
@Override
public void onResultsShown(UserScoreResult userScoreResult) {
String score = userScoreResult.overallScore;
ResultsStatus status = userScoreResult.overallStatus;
}
}
);
Configuration Options
Results has no Builder. Its only option is the results fetch mode, passed to addResults(...).
| Setting | Description |
|---|---|
IDResultsFetchMode.ACCURATE |
Shows results only after all results are calculated, for greater precision. This is the default. |
IDResultsFetchMode.FAST |
Shows partial, less precise results sooner. |
For the complete option set, see Results and IncodeWelcome.IDResultsFetchMode in API Reference.
Result
Results delivers a UserScoreResult through the onResultsShown(UserScoreResult) callback on IncodeWelcome.OnboardingListener. Key fields include:
overallScore: The overall score as a string; for example,"80.5/100".nullwhen unavailable.overallStatus: The overall result status (ResultsStatus);nullwhen unavailable. One of the following:OK: Passed.WARN: Passed with warnings.FAIL: Failed.UNKNOWN: Status could not be determined.MANUAL: Manual review needed.
idVerificationResults: Results of all ID verification checks (IdVerificationResults);nullwhen unavailable.livenessCheckResults: Results of the liveness checks (LivenessCheckResults);nullwhen unavailable.facialRecognitionResults: Results of the facial recognition checks (FacialRecognitionResults);nullwhen unavailable.governmentValidationResults: Results of the government validation checks (GovernmentValidationResults);nullwhen unavailable.extendedUserScoreJsonData: Additional score data as key/value pairs; may be empty.Fields inherited from
BaseResult:resultCode: TheResultCodefor this result.error: WhenresultCodeisERROR, theThrowablethat caused it; otherwise,null.deviceStats: TheDeviceStatssnapshot of the device state when the result was produced.motionStatus: Device motion assessment during capture. One of the following:UNCLEAR: Motion could not be determined; the default.PASS: Device motion was within acceptable limits.FAIL: Excessive device motion was detected.
If the module fails, the error surfaces through OnboardingListener.onError(Throwable). This module does not deliver a module-specific exception subtype.
For all fields, see UserScoreResult in API Reference.