Skip to main content

Customization

Some customization of the document camera is supported. Localization can be updated by overriding strings within your app's strings.xml. In addition to overriding the above, if started via DocumentCameraView, the composition will utilize its wrapping MaterialTheme. The camera is designed for and tested with the SmartCaptureUiTheme, but modifying the appearance of the camera by customizing the MaterialTheme is supported.

Colors

The default values for SmartCaptureUiTheme are:

internal val primary = Color(0xFF6464D4)
internal val onPrimary = Color(0xFFFFFFFF)
internal val primaryContainer = Color(0xFFFFFFFF)
internal val onPrimaryContainer = Color(0xFF003264)

internal val secondary = Color(0xFF5A7FA6)
internal val onSecondary = Color(0xFF514565)
internal val secondaryContainer = Color(0xFF102A3C)
internal val onSecondaryContainer = Color(0xFFFFFFFF)

internal val surface = Color(0xFF000D1A)
internal val onSurface = Color(0xFFFAFCFD)
internal val surfaceVariant = Color(0xFFE0E4E5)
internal val onSurfaceVariant = Color(0xFF434748)

internal val background = Color(0xFF020404)
internal val onBackground = Color(0xFFFAFCFD)

These are provided as a reference and can change without a callout in the migration details.

Localization

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Feedback/Guidance -->
<string name="smartcapture_documentcamera_scanning_default">Position identity document within the frame below</string>
<string name="smartcapture_documentcamera_scanning_front_side">Position the FRONT SIDE of your ID within the frame below</string>
<string name="smartcapture_documentcamera_scanning_back_side">Position the BACK SIDE of your ID within the frame below</string>
<string name="smartcapture_documentcamera_scanning_passport_signature">Position the SIGNATURE PAGE of your Passport within the frame</string>
<string name="smartcapture_documentcamera_issue_no_document">Position your document fully within the frame</string>
<string name="smartcapture_documentcamera_guidance_no_document">Fit your document fully within the frame</string>
<string name="smartcapture_documentcamera_issue_document_too_small">Document is too small</string>
<string name="smartcapture_documentcamera_guidance_document_too_small">Move the phone closer to the document</string>
<string name="smartcapture_documentcamera_issue_document_too_big">Document is too large</string>
<string name="smartcapture_documentcamera_guidance_document_too_big">Move the phone further from the document</string>
<string name="smartcapture_documentcamera_issue_too_much_glare">Light reflection visible on document</string>
<string name="smartcapture_documentcamera_guidance_too_much_glare">Move your document away from direct light sources</string>
<string name="smartcapture_documentcamera_issue_too_blurry">Document is unclear and blurry</string>
<string name="smartcapture_documentcamera_guidance_too_blurry">Hold your document and device steady</string>
<string name="smartcapture_documentcamera_issue_document_not_parallel">Document is not parallel to camera</string>
<string name="smartcapture_documentcamera_guidance_document_not_parallel">Align document and device</string>
<string name="smartcapture_documentcamera_issue_document_too_skewed">Document is skewed relative to camera</string>
<string name="smartcapture_documentcamera_guidance_document_too_skewed">Align document and device</string>
<string name="smartcapture_documentcamera_guidance_too_much_movement">Hold your document and device steady</string>
<string name="smartcapture_documentcamera_feedback_refocusing">Hold your document and device steady</string>
<string name="smartcapture_documentcamera_feedback_capturing">Capturing</string>
<string name="smartcapture_documentcamera_feedback_captured">Photo captured</string>
<string name="smartcapture_documentcamera_feedback_error">Error</string><!-- This error text will not generally get shown as receiving an error should exit the camera -->


<!-- Other -->
<string name="smartcapture_documentcamera_auto_capture_enabled">Auto-capture - ON</string>
<string name="smartcapture_documentcamera_auto_capture_disabled">Auto-capture - OFF</string>

<!-- Help screen -->
<string name="smartcapture_documentcamera_help_glare">Use a well lit area but avoid any strong overhead lighting</string>
<string name="smartcapture_documentcamera_help_blur">Hold your phone steady</string>
<string name="smartcapture_documentcamera_help_low_res">Fill the entire frame with your document</string>
<string name="smartcapture_documentcamera_help_title">How to take a photo of your identity document</string>
<string name="smartcapture_documentcamera_help_description">Place your identity document on a flat surface and:</string>
<string name="smartcapture_documentcamera_help_description_side">Place your document %s up on a flat surface and:</string>
<string name="smartcapture_documentcamera_help_description_side_front">FRONT SIDE</string>
<string name="smartcapture_documentcamera_help_description_side_back">BACK SIDE</string>
<string name="smartcapture_documentcamera_help_auto_capture_instructions">Once the picture is clear, we’ll automatically take a photo.</string>
<string name="smartcapture_documentcamera_help_manual_capture">Still struggling to take a photo, turn off Auto capture</string>


<!-- A11y -->
<string name="smartcapture_documentcamera_camera_preview_a11y">Camera Preview</string>
<string name="smartcapture_documentcamera_help_icon_a11y">Help</string>
<string name="smartcapture_documentcamera_help_close_a11y">Close help</string>
<string name="smartcapture_documentcamera_back_icon_a11y">Back</string>
<string name="smartcapture_documentcamera_capture_icon_a11y">Manual capture</string>
<string name="smartcapture_documentcamera_auto_capture_toggle_a11y">Auto capture</string>
<string name="smartcapture_documentcamera_manual_capture_appeared_a11y">Manual capture button appeared on the bottom of the screen</string>
<string name="smartcapture_documentcamera_auto_capture_toggle_appeared_a11y">Auto capture toggle appeared on the bottom of the screen</string>
</resources>