Skip to main content

Customization

CustomerJourneyConfig.Builder

Included here are all the available settings for the CustomerJourneyConfig builder:

/**
* Builder for Customer Journey Configuration, this is used to lower Intent extras.
*/
@Keep
data class Builder(
baseUrl: String,
credentials: Credentials
) {
/**
* Base Link for IEOS server. https://your-prefix.idscan.cloud
*/
fun setBaseUrl(baseUrl: String) = apply { this.baseUrl = baseUrl }

/**
* Credentials for Upload and get Journey results.
*/
fun setCredentials(credentials: Credentials) = apply { this.credentials = credentials }

/**
* Will override credentials with token, [setCredentials] and [setToken] will override each oder in order.
*/
fun setToken(token: String) = apply { this.credentials = Credentials().setToken(token) }

/**
* Allows providing list of [com.gbgroup.idscan.bento.enterprice.data.Certificate], by default it will be empty list.
*/
fun setCertificates(certificates: List<Certificate>) =
apply { this.certificates = certificates }

/**
* Sets journey definition ID.
*/
fun setJourneyDefinitionId(id: String) = apply { this.journeyDefinitionId = id }

/**
* Allows to set configuration for Document Scanning process
*
* @param config The [QualityCheckConfig] set as required
*/
fun setDocumentScannerConfig(config: DocumentScannerConfig) = apply {
this.documentScannerConfig = config
}

/**
* Set journeyId with random GUID string in case you would like for the backend to generate the journey with the specified value
* In case of invalid GUID, the backend will generate a random string
* @param journeyId The [String] GUID, ex c2a9de7d-1f26-4bea-bab1-27f74a00f917
*/
fun setJourneyId(journeyId: String) = apply {
this.journeyId = journeyId
}

/**
* Sets the activity's window background to be translucent, so that the underlying content behind the activity would be visible.
* This could be used, when you want to inject custom UI, which is either a bottom sheet or a dialog. This has limited testing/support on modern versions of Android. This may be replaced with alternative customization options in a future version.
*
* !!! Warning !!!
* Keep in mind that there are subtle differences between the lifecycle of a translucent activity and a normal activity.
* For example, the background activity is never stopped, only paused, so that it can continue receiving UI updates.
* Please refer to the official Android documentation for more information.
*
* @param isTranslucent value indicating if the activity should be translucent
*/
fun setIsTranslucentActivity(isTranslucent: Boolean) = apply {
this.isTranslucentActivity = isTranslucent
}

/**
* Build [CustomerJourneyConfig]
*/
fun build(): CustomerJourneyConfig {
return CustomerJourneyConfig(
baseUrl,
credentials,
certificates,
journeyDefinitionId,
documentScannerConfig,
journeyId,
isTranslucentActivity
)
}
}

DocumentScannerConfig.Builder

Included here are all the available settings for the DocumentScannerConfig builder:

/**
* Builder for Document Scanner Configuration.
*/
@Keep
data class Builder(
manualCaptureAppearTime: Long = 15000,
manualCaptureDisabled: Boolean = false,
enableScreenshots: Boolean = false
) {
/**
* Allows to control after how long manual capture mode should become visible
*
* @param appearTime The [Long] set as required
*/
fun setManualCaptureAppearTime(appearTime: Long)

/**
* Allows to disable manual capture mode
*
* @param disabled The [Boolean] set as required
*/
fun setManualCaptureDisabled(disabled: Boolean)

/**
* Enables screenshotting. Screenshots are disabled by default.
*
* @param enable The [Boolean] set as required
*/
fun setEnableScreenshots(enable: Boolean)

/**
* Builds the object
*/
fun build()
}

Language Override

MJCS supports overriding the language with the following methods. MJCS does not ship with any non-english language localization, so if you intend to do this, make sure you also localize MJCS

object MJCS {

/**
* Overrides device language and sets the selected language throughout MJCS
* as long as the translated strings have been added to the strings.xml
*
* @param context current context
* @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
* up to 8 characters in length. See the <code>Locale</code> class description about
* valid language values.
*/
@JvmStatic
fun setLanguage(context: Context, language: String)

/**
* Either enables or disables overriding the device language with selected language
* for MJCS.
*
* @param context current context
* @param enabled boolean to either enable or disable overriding device language
*/
@JvmStatic
fun setLanguageSelectionEnabled(context: Context, enabled: Boolean)
}

Localization

Localization keys for MJCS are listed below. Not every key gets used for every journey, but it is easiest to localize all of them rather than trying to pick and chose only the ones used in your journey.

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Alert no rectangle -->
<string name="MJCS_no_rectangle">We were not able to find the document, please try to capture it again.</string>
<string name="MJCS_action_processing">Processing…</string>

<!-- Customer Journey Action Text -->
<string name="MJCS_journey_action_front">You must position the photo side of your Identity Document in vertical within the frame above</string>
<string name="MJCS_journey_action_back">You must position the &lt;b>BACK&lt;/b> side of your identity document in vertical within the frame above</string>
<string name="MJCS_journey_action_selfie">Please capture your selfie</string>
<string name="MJCS_journey_action_poa">Please capture your proof of address document</string>
<string name="MJCS_journey_action_rescan">Please try again</string>
<string name="MJCS_journey_action_passive_liveness_title">Position your face inside the frame</string>
<string name="MJCS_journey_action_selfie_message">Keep your eyes on the screen</string>

<!-- Progress Dialog Texts -->
<string name="MJCS_progress_upload_title">Uploading…</string>
<string name="MJCS_progress_upload_message">Please wait a few seconds…</string>
<string name="MJCS_progress_server_title">Retrieving…</string>
<string name="MJCS_progress_server_message">Server information</string>
<string name="MJCS_progress_config_title">Retrieving…</string>
<string name="MJCS_progress_config_message">Journey Selection…</string>
<string name="MJCS_progress_processing_title">Processing…</string>
<string name="MJCS_progress_processing_message">Please wait a few seconds…</string>
<string name="MJCS_progress_initialising_title">Initializing…</string>
<string name="MJCS_progress_initialising_message">Please wait a few seconds…</string>
<string name="MJCS_progress_camera_title">Opening…</string>
<string name="MJCS_progress_camera_message">Camera opening in progress…</string>
<string name="MJCS_progress_unreachable_title">Server unreachable</string>
<string name="MJCS_progress_timeout_title">Request timeout</string>
<string name="MJCS_progress_action_retry">Retry</string>
<string name="MJCS_progress_action_cancel">Cancel</string>

<!-- Default messages -->
<string name="MJCS_scanning_message">Please fill the frame with ID document</string>

<!-- Liveness ActionEvents -->
<string name="MJCS_action_liveness_front">Look straight at the camera</string>
<string name="MJCS_action_liveness_up">Tilt your face slightly up</string>
<string name="MJCS_action_liveness_down">Tilt your face slightly down</string>
<string name="MJCS_action_liveness_left">Turn your face slightly left</string>
<string name="MJCS_action_liveness_right">Turn your face slightly right</string>
<string name="MJCS_action_liveness_smile">Smile</string>
<string name="MJCS_action_liveness_frown">Frown</string>
<string name="MJCS_action_liveness_none">No Action</string>
<string name="MJCS_action_liveness_title">Liveness Detection</string>
<string name="MJCS_action_liveness_message">Please look straight at the camera and perform the actions presented to you</string>
<string name="MJCS_action_liveness_calibrate_up">Move the device slightly up</string>
<string name="MJCS_action_liveness_calibrate_down">Move the device slightly down</string>
<string name="MJCS_action_liveness_calibrate_left">Move the device slightly left</string>
<string name="MJCS_action_liveness_calibrate_right">Move the device slightly right</string>
<string name="MJCS_action_liveness_calibrate_proceed">Proceed</string>
<string name="MJCS_action_liveness_action_message">Keep your eyes on the screen</string>
<string name="MJCS_action_liveness_error_title">Something went wrong!</string>
<string name="MJCS_action_liveness_error_description">Keep your eyes on the screen. Try again</string>
<string name="MJCS_liveness_view_start_button_text">Start</string>
<string name="MJCS_liveness_start_title">Liveness Detection</string>
<string name="MJCS_liveness_start_subtitle">We need to check that no one is trying to impersonate you.</string>
<string name="MJCS_liveness_start_description">Look directly at the camera and follow the on screen instructions.</string>
<string name="MJCS_liveness_upload_loading_title">Just a moment…</string>
<string name="MJCS_liveness_upload_loading_passed_title">Passed</string>
<string name="MJCS_liveness_upload_loading_complete_title">Completed</string>
<string name="MJCS_liveness_upload_loading_subtitle">Performing liveness checks, won\'t be long</string>
<string name="MJCS_liveness_upload_loading_complete_subtitle">You have completed all checks</string>
<string name="MJCS_liveness_upload_loading_passed_subtitle">Checks completed</string>
<string name="MJCS_liveness_upload_loading_button_text">Continue</string>
<string name="MJCS_liveness_upload_loading_button_retry_text">Retry</string>
<string name="MJCS_liveness_upload_error_subtitle">Please retry</string>
<string name="MJCS_liveness_upload_error_title">Something went wrong!</string>
<string name="MJCS_liveness_action_error_retry">%s again</string>
<string name="MJCS_liveness_action_keep_going">Keep Going</string>
<string name="MJCS_liveness_action_hold_smile">Hold that smile</string>
<string name="MJCS_liveness_action_hold_frown">Hold that frown</string>
<string name="MJCS_passive_liveness_upload_error_title">Uh Oh</string>
<string name="MJCS_passive_liveness_upload_error_face_too_close_message">You are too close, please move further away so that your face fits within the provided frame</string>
<string name="MJCS_passive_liveness_upload_error_face_close_border_message">You are too close, please move further away so that your face fits within the provided frame</string>
<string name="MJCS_passive_liveness_upload_error_face_cropped_message">Something went wrong, please try again</string>
<string name="MJCS_passive_liveness_upload_error_face_not_found_message">We are unable to detect a face, please try again</string>
<string name="MJCS_passive_liveness_upload_error_face_too_small_message">You are too far away, please move closer to the camera and make sure your face fits within the frame</string>
<string name="MJCS_passive_liveness_upload_error_face_angle_too_large_message">Something went wrong, please try again</string>
<string name="MJCS_passive_liveness_upload_error_too_many_faces_message">We are unable to detect a face, please try again</string>
<string name="MJCS_passive_liveness_upload_error_occluded_face_message">It looks like your face is partly covered, please try again.</string>
<string name="MJCS_passive_liveness_upload_error_unknown_message">Something went wrong, please try again</string>
<string name="MJCS_passive_liveness_upload_error_internal_message">Something went wrong, please try again</string>

<!-- Accessibility Values -->
<string name="MJCS_accessibility_animation">Animation indicating what action to perform</string>

<!-- Document Scanner Error Messages-->
<string name="MJCS_error_exit_journey">User exits the journey</string>

<!-- Manual extraction messages-->
<string name="MJCS_extraction_finish">Submit</string>
<string name="MJCS_extraction_confirm_finish">Submit</string>
<string name="MJCS_extraction_loading_message">Loading…</string>
<string name="MJCS_extraction_processing_message">We\'re getting busy…</string>
<string name="MJCS_extraction_confirm_cancel">Retry</string>

<!-- Scanner Messages -->
<string name="MJCS_glare_detected">Glare Detected</string>
<string name="MJCS_blur_detected">Blur Detected</string>
<string name="MJCS_low_resolution_detected">Low Resolution</string>
<string name="MJCS_content_description">Partial Document Detected</string>
<string name="MJCS_document_boundary_detected">Document Not In Frame</string>
<string name="MJCS_image_captured">Successfully captured the image</string>

<string name="MJCS_glare_detected_description">Move the document away from direct light sources.</string>
<string name="MJCS_blur_detected_description">Hold the document or device steady.</string>
<string name="MJCS_low_resolution_detected_description">Move the phone closer to the document.</string>
<string name="MJCS_document_boundary_detected_description">Fit the document fully within the frame.</string>

<!-- log messages -->
<string name="log_tryng_to_recover">Trying to recover -> %s</string>
<string name="log_customer_journey_trying_to_recover">Trying to recover: %s</string>

<!-- Triple Scan -->
<string name="MJCS_triple_scan_cancel_verification_button">End Identity Verification</string>
<string name="MJCS_triple_scan_retry_button">Try Again</string>
<string name="MJCS_triple_scan_attempts_remaining_text">You have %d attempts(s) remaining.</string>
<string name="MJCS_triple_scan_validation_failed_document_not_accepted_title">Validation failed - document not accepted.</string>
<string name="MJCS_triple_scan_not_accepted_title">Validation failed - document not accepted.</string>
<string name="MJCS_triple_scan_not_accepted_subtitle">Your Identity Document is not an accepted document type.\n\n\nPlease try again with a different document.</string>
<string name="MJCS_triple_scan_not_supported_title">Validation failed - document unknown.</string>
<string name="MJCS_triple_scan_not_supported_subtitle">Your Identity Document could not be classified or is not supported.\n\n\nPlease try again.</string>
<string name="MJCS_triple_scan_refer_title">Validation failed.</string>
<string name="MJCS_triple_scan_refer_subtitle">Your Identity Document failed the validation. \n\n\nPlease try again.</string>
<string name="MJCS_triple_scan_expired_title">Validation failed - document expired.</string>
<string name="MJCS_triple_scan_expired_subtitle">Your Identity Document is expired. \n\n\nPlease try again with a valid document.</string>

<string name="MJCS_triple_scan_quality_errors_text">%1$s \n\n%2$s \n\n%3$s \n\n%4$s</string>
<string name="MJCS_triple_scan_quality_errors_title">Quality Issues Detected!</string>

<string name="MJCS_triple_scan_quality_errors_blur_text">&lt;b>• Blur&lt;/b> - the document is unclear;</string>
<string name="MJCS_triple_scan_quality_errors_glare_text">&lt;b>• Glare&lt;/b> - the document is unreadable due to a bright light source;</string>
<string name="MJCS_triple_scan_quality_errors_low_res_text">&lt;b>• Low Resolution&lt;/b> - the document does not fill the frame properly;</string>
<string name="MJCS_triple_scan_quality_errors_boundary_text">&lt;b>• Missing Edges&lt;/b> - the document is not positioned in the frame properly;</string>

<!-- Triple Scan Ozone -->
<string name="MJCS_triple_scan_ozone_title">NFC chip scan failed</string>
<string name="MJCS_triple_scan_ozone_button">Scan NFC chip again</string>
<string name="MJCS_triple_scan_ozone_subtitle">We were unable to read your document’s electronic chip.\n\n\nPlease try scanning it again.</string>

<!-- Font -->
<string name="MJCS_font_normal" translatable="false">sans-serif</string>
<string name="MJCS_font_semi_bold" translatable="false">sans-serif-medium</string>

<string name="MJCS_primaryBtnFont" translatable="false">@string/MJCS_font_normal</string>
<string name="MJCS_destructiveBtnFont" translatable="false">@string/MJCS_font_normal</string>
<string name="MJCS_tertiaryBtnFont" translatable="false">@string/MJCS_font_normal</string>
<string name="MJCS_heading1Font" translatable="false">@string/MJCS_font_semi_bold</string>
<string name="MJCS_heading2Font" translatable="false">@string/MJCS_font_semi_bold</string>
<string name="MJCS_heading3Font" translatable="false">@string/MJCS_font_semi_bold</string>
<string name="MJCS_paragraph1Font" translatable="false">@string/MJCS_font_normal</string>
<string name="MJCS_paragraph2Font" translatable="false">@string/MJCS_font_normal</string>

<!-- READ ID -->
<string name="readid_waiting_for_chip">Please hold the document to the back of your phone…</string>
<string name="readid_starting_over">Lost connection\nAutomatically starting over…</string>
<string name="readid_skip_reading_underlined"><u>Skip reading</u></string>


<!-- Accessibility-->
<string name="MJCS_accessibility_capture_button_announcement">Manual capture button appeared on the bottom of the screen</string>
<string name="MJCS_accessibility_manual_capture_logo_description">Captured document confirmation screen</string>
<string name="MJCS_accessibility_manual_capture_captured_image_description">Captured document image</string>
<string name="MJCS_accessibility_passive_liveness_logo_description">Manual selfie capture screen</string>
<string name="MJCS_accessibility_active_liveness_logo_description">Liveness capture</string>
<string name="MJCS_accessibility_active_liveness_close_button_description">Close</string>

<!-- Accessibility Active Liveness Errors -->
<string name="MJCS_accessibility_active_liveness_error_straight">Something went wrong, look straight at the camera again</string>
<string name="MJCS_accessibility_active_liveness_error_left">Something went wrong, turn your face slightly left again</string>
<string name="MJCS_accessibility_active_liveness_error_right">Something went wrong, turn your face slightly right again</string>
<string name="MJCS_accessibility_active_liveness_error_up">Something went wrong, turn your face slightly up again</string>
<string name="MJCS_accessibility_active_liveness_error_down">Something went wrong, tilt your face slightly down again</string>
<string name="MJCS_accessibility_active_liveness_error_smile">Something went wrong, smile again</string>
<string name="MJCS_accessibility_active_liveness_error_frown">Something went wrong, frown again</string>

<!-- Data checks -->
<string name="MJCS_datachecks_address_title">Enter your address</string>
<string name="MJCS_datachecks_address_subtitle">For Right to Work, we need to verify your address. Enter your address below.</string>
<string name="MJCS_datachecks_house_name_or_number">House Name / Number*</string>
<string name="MJCS_datachecks_street_name">Street Name*</string>
<string name="MJCS_datachecks_town">Town*</string>
<string name="MJCS_datachecks_postcode">Postcode*</string>
<string name="MJCS_datachecks_continue_button">Continue</string>
<string name="MJCS_datachecks_server_error_title">Something went wrong</string>
<string name="MJCS_datachecks_server_error_message">Please try again</string>
<string name="MJCS_datachecks_server_error_retry_button">Close</string>
<string name="MJCS_datachecks_cancel_button">Cancel</string>
<string name="MJCS_datachecks_postcode_input_error">Enter a valid postcode</string>
<string name="MJCS_datachecks_town_input_error">Only alphabetic characters are allowed</string>
<string name="MJCS_datachecks_street_name_input_error">Only alphabetic characters are allowed</string>
<string name="MJCS_datachecks_house_name_or_number_input_error">Only alphanumeric characters are allowed</string>
<string name="MJCS_datachecks_postcode_hint_text">5 or more characters with no spaces e.g. CH49GB</string>
</resources>