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 */ }
}
}
}
)
)Mode 2 – Orchestrator Flow
A single call to AbleCredit.startLoanFlow() drives the entire loan capture journey. You declare an ordered list of steps and a listener. The SDK sequences screens automatically and delivers lifecycle events to your listener.
Loan Operations
Core loan lifecycle methods – creating a loan case, pre-caching it, and generating the report.