Skip to Content
Docs
Get startedPartner API v4Partner API v3Android SDK
v1.0.8

Mode 3 – Docked Button

Like Mode 1 but each SDK screen shows a persistent button at the bottom that you define. The button's onClick lambda receives the SDK screen's Context – use it to start your own Activity or chain directly to the next SDK method.

The docked button is scoped to the single screen it was passed for. It is read once when the screen opens. Passing null shows no button.

Example – Audio → Your review screen → Photos → Report

// Audio screen → navigate to your own review screen on tap
AbleCredit.recordAudio(
    context           = this,
    loanApplicationId = applicationId,
    listener          = object : AbleCreditFileUploadListener {
        override fun onStatusChanged(uniqueId: String, status: AbleCreditFileStatus, message: String?) {
            when (status) {
                AbleCreditFileStatus.UPLOADED -> myStore.markUploaded(uniqueId)
                AbleCreditFileStatus.FAILED   -> myStore.markFailed(uniqueId, message)
                else -> {}
            }
        }
    },
    dockedButton = AbleCreditDockedButton(
        label  = "Done – Review Recordings",
        onClick = { context ->
            context.startActivity(
                Intent(context, AudioReviewActivity::class.java)
                    .putExtra("applicationId", applicationId)
            )
        }
    )
)

// Business photos → chain to next SDK method directly
AbleCredit.captureBusinessPhotos(
    context           = this,
    loanApplicationId = applicationId,
    dockedButton      = AbleCreditDockedButton(
        label  = "Next – Family Photos",
        onClick = { context ->
            AbleCredit.captureFamilyPhotos(context, applicationId)
        }
    )
)

// Last screen → trigger report on tap
AbleCredit.captureFamilyPhotos(
    context           = this,
    loanApplicationId = applicationId,
    dockedButton      = AbleCreditDockedButton(
        label  = "Generate Report",
        onClick = { context ->
            AbleCredit.requestReportGeneration(context, applicationId) { result ->
                when (result) {
                    is AbleCreditResult.Success ->
                        context.startActivity(Intent(context, DoneActivity::class.java))
                    is AbleCreditResult.Failure -> { /* handle */ }
                }
            }
        }
    )
)

On this page