diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b2285811..f4effa5e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 10.0.0-beta13 (unreleased) ### Added +- Added `allowAgentMode` option on Document Verification and Enhanced Document Verification ### Fixed diff --git a/lib/src/main/java/com/smileidentity/compose/SmileIDExt.kt b/lib/src/main/java/com/smileidentity/compose/SmileIDExt.kt index b3a62b079..d19312567 100644 --- a/lib/src/main/java/com/smileidentity/compose/SmileIDExt.kt +++ b/lib/src/main/java/com/smileidentity/compose/SmileIDExt.kt @@ -147,6 +147,9 @@ fun SmileID.SmartSelfieAuthentication( * correspond to a unique Job ID within your own system. If not provided, a random job ID will be * generated * @param showAttribution Whether to show the Smile ID attribution or not on the Instructions screen + * @param allowAgentMode Whether to allow Agent Mode or not. If allowed, a switch will be displayed + * allowing toggling between the back camera and front camera. If not allowed, only the front + * camera will be used. * @param allowGalleryUpload Whether to allow the user to upload images from their gallery or not * @param showInstructions Whether to deactivate capture screen's instructions for Document * Verification (NB! If instructions are disabled, gallery upload won't be possible) @@ -167,6 +170,7 @@ fun SmileID.DocumentVerification( userId: String = rememberSaveable { randomUserId() }, jobId: String = rememberSaveable { randomJobId() }, showAttribution: Boolean = true, + allowAgentMode: Boolean = false, allowGalleryUpload: Boolean = false, showInstructions: Boolean = true, colorScheme: ColorScheme = SmileID.colorScheme, @@ -180,6 +184,7 @@ fun SmileID.DocumentVerification( userId = userId, jobId = jobId, showAttribution = showAttribution, + allowAgentMode = allowAgentMode, allowGalleryUpload = allowGalleryUpload, showInstructions = showInstructions, idAspectRatio = idAspectRatio, @@ -221,6 +226,9 @@ fun SmileID.DocumentVerification( * correspond to a unique Job ID within your own system. If not provided, a random job ID will be * generated * @param showAttribution Whether to show the Smile ID attribution or not on the Instructions screen + * @param allowAgentMode Whether to allow Agent Mode or not. If allowed, a switch will be displayed + * allowing toggling between the back camera and front camera. If not allowed, only the front + * camera will be used. * @param allowGalleryUpload Whether to allow the user to upload images from their gallery or not * @param showInstructions Whether to deactivate capture screen's instructions for Document * Verification (NB! If instructions are disabled, gallery upload won't be possible) @@ -240,6 +248,7 @@ fun SmileID.EnhancedDocumentVerificationScreen( userId: String = rememberSaveable { randomUserId() }, jobId: String = rememberSaveable { randomJobId() }, showAttribution: Boolean = true, + allowAgentMode: Boolean = false, allowGalleryUpload: Boolean = false, showInstructions: Boolean = true, colorScheme: ColorScheme = SmileID.colorScheme, @@ -253,6 +262,7 @@ fun SmileID.EnhancedDocumentVerificationScreen( userId = userId, jobId = jobId, showAttribution = showAttribution, + allowAgentMode = allowAgentMode, allowGalleryUpload = allowGalleryUpload, showInstructions = showInstructions, idAspectRatio = idAspectRatio, diff --git a/lib/src/main/java/com/smileidentity/compose/document/OrchestratedDocumentVerificationScreen.kt b/lib/src/main/java/com/smileidentity/compose/document/OrchestratedDocumentVerificationScreen.kt index cf0ab0ac8..acd2154b2 100644 --- a/lib/src/main/java/com/smileidentity/compose/document/OrchestratedDocumentVerificationScreen.kt +++ b/lib/src/main/java/com/smileidentity/compose/document/OrchestratedDocumentVerificationScreen.kt @@ -37,6 +37,7 @@ internal fun OrchestratedDocumentVerificationScreen( userId: String = rememberSaveable { randomUserId() }, jobId: String = rememberSaveable { randomJobId() }, showAttribution: Boolean = true, + allowAgentMode: Boolean = false, allowGalleryUpload: Boolean = false, showInstructions: Boolean = true, onResult: SmileIDCallback = {}, @@ -90,7 +91,7 @@ internal fun OrchestratedDocumentVerificationScreen( userId = userId, jobId = jobId, isEnroll = false, - allowAgentMode = false, + allowAgentMode = allowAgentMode, showAttribution = showAttribution, showInstructions = showInstructions, skipApiSubmission = true,