Presenting Screens

The SDK provides different pathways to presenting the same screens to avoid a stringent user experience whilst integrating

Step 1 : Call Smile UI

Call the required screen or screens as per the example below

new SIDCaptureManager.Builder(<Activity>,<CaptureType>, <REQUEST_CODE>)
The above will call a screen as per the CaptureType specified and you have 4 options to choose from

CaptureType.SELFIE Will show the selfie screen then the review screen before sending the results back to your application

CaptureType.ID_CAPTURE Will show the ID card capture screen then send results back to your application

CaptureType.SELFIE_AND_ID_CAPTURE Will show the selfie screen then the review screen and then the id card capture screen before sending the results back to your application CaptureType.ID_CAPTURE_AND_SELFIE Will show the id card capture screen then the selfie screen then the review screen and before sending the results back to your application.

Step 2: Get Results Using from onActivityResult

The results for the screens are returned in

protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {

These have

  • data.getStringExtra(SMILE_REQUEST_RESULT_TAG)

    This is either the tag supplied to the manager or if none was supplied this is an autogenerated tag from the SDK identifying the job

  • data.getStringExtra(SMILE_REQUEST_RESULT_TAG) This is the result code returned from the capture which can signify a success or failure

Possible values for SMILE_REQUEST_RESULT_TAG are

  1. -1 represents a successful capture

  2. 777 represents a user cancelled capture

  3. 888 represents a failed document capture eror

  4. 999 represents a failed selfie capture error

  5. 1011 represents a permissions error

Last updated