Skip to content

Conversation

@wangerekaharun
Copy link
Member

@wangerekaharun wangerekaharun commented Dec 23, 2025

User description

Story: https://app.shortcut.com/smileid/story/xxx

Summary

A few sentences/bullet points about the changes

Known Issues

Any shortcomings in your work. This may include corner cases not correctly handled or issues related
to but not within the scope of your PR. Design compromises should be discussed here if they were not
already discussed above.

Test Instructions

Concise test instructions on how to verify that your feature works as intended. This should include
changes to the development environment (if applicable) and all commands needed to run your work.

Screenshot

If applicable (e.g. UI changes), add screenshots to help explain your work.


PR Type

Enhancement


Description

  • Updated Smile Android SDK from version 11.1.5 to 11.1.6-20251223.105338-1

  • Added smileSensitivity parameter with NORMAL value to SmartSelfie and DocumentVerification flows

  • Removed obsolete uses-sdk override declaration from AndroidManifest

  • Imported SmileSensitivity model for sensitivity configuration


File Walkthrough

Relevant files
Dependencies
libs.versions.toml
Bump Smile Android SDK version                                                     

gradle/libs.versions.toml

  • Updated smile-android-sdk version from 11.1.5 to
    11.1.6-20251223.105338-1
+1/-1     
Configuration changes
AndroidManifest.xml
Remove obsolete SDK override declaration                                 

sample/src/main/AndroidManifest.xml

  • Removed uses-sdk tools override for Google Play Services common
    library
+0/-2     
Enhancement
MainScreen.kt
Add smile sensitivity configuration to biometric flows     

sample/src/main/java/com/smileidentity/sample/compose/MainScreen.kt

  • Added import for SmileSensitivity model
  • Added smileSensitivity = SmileSensitivity.NORMAL parameter to
    SmartSelfieEnrollment
  • Added smileSensitivity = SmileSensitivity.NORMAL parameter to
    SmartSelfieAuthentication
  • Added smileSensitivity = SmileSensitivity.NORMAL parameter to
    DocumentVerification
+4/-0     


Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @prfectionist
    Copy link
    Contributor

    prfectionist bot commented Dec 23, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Snapshot Version

    The SDK version '11.1.6-20251223.105338-1' appears to be a snapshot/development version based on the timestamp suffix. Using snapshot versions in production code can lead to instability and non-reproducible builds. Verify if this is intentional for development/testing purposes or if a stable release version should be used instead.

    smile-android-sdk = "11.1.6-20251223.105338-1"
    Hardcoded Configuration

    The smileSensitivity parameter is hardcoded to SmileSensitivity.NORMAL in all three locations (SmartSelfieEnrollment, SmartSelfieAuthentication, and DocumentVerification). Consider whether this should be configurable by users or if different sensitivity levels might be appropriate for different use cases.

            smileSensitivity = SmileSensitivity.NORMAL,
        ) { result ->
            viewModel.onSmartSelfieEnrollmentResult(userId, jobId, result)
            navController.popBackStack()
        }
    }
    dialog(ProductScreen.SmartSelfieAuthentication.route) {
        LaunchedEffect(Unit) { viewModel.onSmartSelfieAuthenticationSelected() }
        SmartSelfieAuthenticationUserIdInputDialog(
            onDismiss = {
                viewModel.onHomeSelected()
                navController.popBackStack()
            },
            onConfirm = { userId ->
                navController.navigate(
                    "${ProductScreen.SmartSelfieAuthentication.route}/$userId",
                ) { popUpTo(BottomNavigationScreen.Home.route) }
            },
        )
    }
    composable(ProductScreen.SmartSelfieAuthentication.route + "/{userId}") {
        LaunchedEffect(Unit) { viewModel.onSmartSelfieAuthenticationSelected() }
        val userId = rememberSaveable { it.arguments?.getString("userId")!! }
        val jobId = rememberSaveable { randomJobId() }
        SmileID.SmartSelfieAuthentication(
            userId = userId,
            jobId = jobId,
            allowAgentMode = true,
            smileSensitivity = SmileSensitivity.NORMAL,
        ) { result ->
            viewModel.onSmartSelfieAuthenticationResult(userId, jobId, result)
            navController.popBackStack()
        }
    }
    composable(ProductScreen.SmartSelfieEnrollmentEnhanced.route) {
        LaunchedEffect(Unit) { viewModel.onSmartSelfieEnrollmentV2Selected() }
        SmileID.SmartSelfieEnrollmentEnhanced {
            viewModel.onSmartSelfieEnrollmentV2Result(it)
            navController.popBackStack()
        }
    }
    dialog(ProductScreen.SmartSelfieAuthenticationEnhanced.route) {
        LaunchedEffect(Unit) { viewModel.onSmartSelfieAuthenticationV2Selected() }
        SmartSelfieAuthenticationUserIdInputDialog(
            onDismiss = {
                viewModel.onHomeSelected()
                navController.popBackStack()
            },
            onConfirm = { userId ->
                navController.navigate(
                    "${ProductScreen.SmartSelfieAuthenticationEnhanced.route}/$userId",
                ) { popUpTo(BottomNavigationScreen.Home.route) }
            },
        )
    }
    composable(ProductScreen.SmartSelfieAuthenticationEnhanced.route + "/{userId}") {
        LaunchedEffect(Unit) { viewModel.onSmartSelfieAuthenticationV2Selected() }
        val userId = rememberSaveable { it.arguments?.getString("userId")!! }
        SmileID.SmartSelfieAuthenticationEnhanced(userId = userId) {
            viewModel.onSmartSelfieAuthenticationV2Result(it)
            navController.popBackStack()
        }
    }
    composable(ProductScreen.EnhancedKyc.route) {
        LaunchedEffect(Unit) { viewModel.onEnhancedKycSelected() }
        val userId = rememberSaveable { randomUserId() }
        val jobId = rememberSaveable { randomJobId() }
        OrchestratedEnhancedKycScreen(
            userId = userId,
            jobId = jobId,
            onConsentDenied = {
                viewModel.onConsentDenied()
                navController.popBackStack(
                    route = BottomNavigationScreen.Home.route,
                    inclusive = false,
                )
            },
        ) { result ->
            viewModel.onEnhancedKycResult(result)
            navController.popBackStack()
        }
    }
    composable(ProductScreen.BiometricKyc.route) {
        LaunchedEffect(Unit) { viewModel.onBiometricKycSelected() }
        val userId = rememberSaveable { randomUserId() }
        val jobId = rememberSaveable { randomJobId() }
        var idInfo: IdInfo? by remember { mutableStateOf(null) }
        var consentInformation: ConsentInformation? by remember { mutableStateOf(null) }
        if (idInfo == null) {
            IdTypeSelectorAndFieldInputScreen(
                userId = userId,
                jobId = jobId,
                jobType = JobType.BiometricKyc,
                onConsentDenied = {
                    viewModel.onConsentDenied()
                    navController.popBackStack(
                        route = BottomNavigationScreen.Home.route,
                        inclusive = false,
                    )
                },
                onResult = { id, consent ->
                    idInfo = id
                    consentInformation = consent
                },
            )
        }
        val id = idInfo ?: return@composable
        SmileID.BiometricKYC(
            idInfo = id,
            consentInformation = consentInformation,
            userId = userId,
            jobId = jobId,
        ) { result ->
            viewModel.onBiometricKycResult(userId, jobId, result)
            if (result is SmileIDResult.Success) {
                navController.popBackStack()
            } else {
                idInfo = null
            }
        }
    }
    composable(ProductScreen.DocumentVerification.route) {
        LaunchedEffect(Unit) { viewModel.onDocumentVerificationSelected() }
        DocumentVerificationIdTypeSelector { country, idType, captureBothSides ->
            navController.navigate(
                route = ProductScreen.DocumentVerification.route +
                    "/$country/$idType/$captureBothSides",
            ) { popUpTo(ProductScreen.DocumentVerification.route) }
        }
    }
    composable(
        ProductScreen.DocumentVerification.route +
            "/{country}/{idType}/{captureBothSides}",
    ) {
        LaunchedEffect(Unit) { viewModel.onDocumentVerificationSelected() }
        val userId = rememberSaveable { randomUserId() }
        val jobId = rememberSaveable { randomJobId() }
        SmileID.DocumentVerification(
            userId = userId,
            jobId = jobId,
            countryCode = it.arguments?.getString("country")!!,
            documentType = it.arguments?.getString("idType"),
            captureBothSides = it.arguments?.getString("captureBothSides").toBoolean(),
            showInstructions = true,
            allowGalleryUpload = true,
            smileSensitivity = SmileSensitivity.NORMAL,

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    1 participant