UI Components

In addition to the high level orchestrated screens described in Products, we also make available the smaller building-block UI components that are used to build those screens.

In addition to the high level orchestrated screens described in Products, we also make available the smaller building-block UI components that are used to build those screens.

Details about available components can be found by visiting the reference docs/javadocs at https://javadoc.io/doc/com.smileidentity/android-sdk/latest/allclasses.html

You must use Jetpack Compose in order to use these lower level UI components

For example, if you want to display only the Selfie Instruction screen:

SmartSelfieInstructionsScreen(
    onInstructionsAcknowledged = { /* perform some action */ }
)

Selfie Capture

We also make available the smaller building-block UI components for selfie capture which goes through the flow and you can configure which screens or step to show which include the below

  • Selfie capture instruction screen which can be shown or hidden

  • Selfie capture screen

  • Selfie confirmation which can be shown or hidden

SmileIDSmartSelfieCaptureView(
  showConfirmationDialog: true, //if true will show confirmation dialog after a successful selfie capture
  showInstructions: true, //if true will show instruction screen before selfie capture
  showAttribution: true, //if true will show SmileID attribution on the instruction screen
  allowAgentMode: true,//if true will show the switch for agent mode
  onSuccess: (String? result) {
    // Your success handling logic
    Map<String, dynamic> jsonResult = json.decode(result ?? '{}');
    String formattedResult = jsonEncode(jsonResult);
  },
  onError: (String errorMessage) {
    // Your error handling logic
  },
)

Document Capture

We also make available the smaller building-block UI components for document capture which goes through the flow and you can configure which screens or step to show which include the below

  • Document capture instruction screen which can be shown or hidden

  • Document capture screen

  • Document confirmation which can be shown or hidden

SmileIDDocumentCaptureView(
 isDocumentFrontSide: true, //if true will show the instruction and prompts for front of document capture
 showInstructions: true, //if true will show instruction screen before document capture
 showAttribution: true, //if true will show SmileID attribution on the instruction screen
 showConfirmationDialog: true,//if true will show confirmation dialog after a successful document capture
 allowGalleryUpload: false,//if true will show the option to upload from gallery in addition to the take photo option
 onSuccess: (String? result) {
    // Your success handling logic
    Map<String, dynamic> jsonResult = json.decode(result ?? '{}');
    String formattedResult = jsonEncode(jsonResult);
  },
 onError: (String errorMessage) {
    // Your error handling logic
  },
)

Last updated