Android Biometric 1.4.0: What Should Happen When the Prompt Can’t Finish?

AndroidX Biometric 1.4.0 fallback testing should include what happens when the prompt cannot finish. A cancelled attempt must leave the protected action locked. So should an enrolment problem or lockout until a permitted authentication route actually succeeds.

For a Nigerian mobile-app portfolio, a clear recovery demonstration is more useful than a screenshot of a fingerprint icon. This article proposes four scenarios across two target profiles. All eight checks are unrun. The worksheet records what to test; it supplies no device results, biometric data or security certification.

Separate a library release from device capability

The 2 December AndroidX release notes list stable 1.4.0 releases for biometric and biometric-compose. A dependency version does not establish every phone’s available hardware, enrolled credentials or supported prompt combination. Record the actual device and OS build alongside the library artifact you intend to test.

A portfolio README should say which route the app uses. Distinguish the classic BiometricPrompt API from newer activity-result or Compose integration. Do not paste a callback from one route into another and assume the meanings match. Use the documentation for the selected API and retain that choice in the test record.

Plan four scenarios for each target profile

ScenarioExpected application boundary
Valid successPermit the protected action only after the required successful result
User cancellationKeep the action locked
No biometric enrolmentKeep it locked and show the configured setup or recovery path
Temporary lockoutKeep it locked and handle the supported recovery or retry state
Nigeria Coding Academy proposed test expectations. These are acceptance criteria, not observed results.
Eight proposed checks combine success, cancellation, no enrolment and temporary lockout with an API 29 example and an API 30+ example. Every cell is planned and unrun.
The matrix counts planned cases, not supported devices or passed tests. The two profiles require different configuration checks before execution.

Use a harmless protected action in the demonstration, such as revealing a synthetic note. It should stay hidden when authentication is cancelled or returns an error. The success path should reveal only that mock content. Avoid testing with real identity records or a production account simply to make the portfolio look realistic.

For every case, record the starting locked state, action taken, returned result and visible outcome. A screenshot alone may hide an unintended state change. Retain a short event trace containing no secrets so a reviewer can see whether the protected action was reached. Leave the observation blank until you perform the check.

Document the credential route by Android version

The Android authentication guide defines device credentials as the screen-lock PIN, pattern or password. It notes that DEVICE_CREDENTIAL alone and BIOMETRIC_STRONG combined with DEVICE_CREDENTIAL are unsupported by the described PromptInfo configuration on API 29 and lower. Those combinations must not be copied into the older profile unchanged.

Our API 29 example therefore plans a biometric-only prompt with a separately specified app-account recovery route. That route is not the device-credential option. The API 30+ example plans a strong-biometric-or-device-credential route only where the selected configuration is supported. Neither profile proves a particular handset is ready.

The guide also calls for checking availability with the same allowed authenticator combination used for the prompt. It prohibits combining a negative-button label with DEVICE_CREDENTIAL in that builder. Preserve these constraints in the configuration checklist, rather than hiding them behind a general “fallback available” label.

Keep AndroidX Biometric 1.4.0 fallback testing honest

A proposed state map permits the mock protected action only after valid success. Cancellation or an error keeps it locked while a supported recovery route or retry state is shown.
The map explains the acceptance boundary. It is not a diagram of Android internals or a claim that a fallback has been tested on a device.

A user pressing Cancel has made a choice, not supplied an authentication result. Return them to an appropriate locked screen. A friendly message can explain the next available action, but it must not quietly open the protected content. Check that screen rotation or returning to the app does not revive a cancelled success-looking state.

No enrolment and temporary lockout deserve separate rows because the next useful message can differ. Record the actual result supplied by the selected API. Offer only the setup, account recovery or credential route that the app permits and the target supports. The matrix does not recommend a universal error-to-success shortcut.

Make the portfolio reviewable on the devices you have

List the device models and OS builds you can actually access. A Nigerian learner with one handset can still document a careful bounded check, but should not mark the other profile as passed. Keep unavailable equipment visible as a limitation. A simulated result can test screen logic only when it is labelled as simulated.

After execution, add the observed screen, returned result and decision to the blank ledger. Explain any deviation and keep a reproducible project revision. For a separate interface exercise, see our Android Chrome form test plan. Its browser journeys do not substitute for native authentication checks.

Download the acceptance tools

Method and limitations

Checked on 5 December 2026. We read Android’s release notes and authentication guide, then designed two illustrative profiles and four scenarios per profile. No app was built, no hardware capability was measured and no device authentication was attempted. The proposed matrix needs API-specific implementation and actual observations before any pass claim.