Skip to content

Read the result

With the ready-made screen the result view is free: a green or red banner, a large portrait for face matching, the fields, the checks that ran and “Last established” for revocation.

If you drive the check yourself, the session reports states and finishes with an AcceptanceResult:

ReadResult.kt
package samples
import com.wallet.WalletSdk
import com.wallet.model.AcceptanceDecision
import com.wallet.model.AcceptanceResult
import com.wallet.model.VerificationState
import kotlinx.coroutines.flow.collect
/** Driving a check yourself instead of using the screen: start, connect with the scanned QR, read the result. */
class ReadResult(private val sdk: WalletSdk) {
suspend fun run(scannedQrText: String, show: (String) -> Unit, onDone: (AcceptanceResult) -> Unit) {
val session = sdk.verifier.startReaderSession(Checks.AGE_18.request)
session.connect(scannedQrText)
session.state.collect { state ->
when (state) {
is VerificationState.Done -> {
when (state.result.decision) {
AcceptanceDecision.ACCEPT -> show("Accepted")
AcceptanceDecision.REJECT -> show("Rejected: ${state.result.reason}")
AcceptanceDecision.INCONCLUSIVE -> show("Check again online: ${state.result.reason}")
}
onDone(state.result)
}
is VerificationState.Failed -> show("Failed: ${state.error.message}")
else -> show("Working…") // AwaitingEngagement, Connecting, Verifying
}
}
}
}
Field Meaning
decision ACCEPT, REJECT or INCONCLUSIVE
disclosedClaims the fields, for example family_name → "Hakim"
portrait the photo bytes, if released
issuerName who issued it (from the document, or your issuerDisplayNames)
signatureValid, issuerTrusted, withinValidityWindow the checks behind the decision
revocation, revocationDataStale, revocationCheckedAt revocation status and how current it is
reason why it was rejected or inconclusive

Every decision and reason is listed in Errors and states.

The check itself needs no network. Revocation uses the last downloaded status; the result says how old that answer is. Policies and details: Work offline.

Next: Go live.