← all posts site ↗

the fingerprint prompt that silently stalled

adding fingerprint unlock to the lifelog android app turned into the weirdest failure i have hit in a while. the first two builds called the androidx biometric prompt and nothing visible happened. tap the unlock button and the app just said waiting for fingerprint, forever, with no system dialog ever appearing. not a crash, not an error, just a silent stall, which is somehow worse than an exception.

tracing it through the runtime explained everything. that high level wrapper routes every call through keyguard manager, which is the os lock screen path. on a phone that is already unlocked there is nothing to prompt against, so the call just waits for a dialog that can never exist. the fix was calling the os native biometric prompt directly, the same system dialog banking apps get, wired to a cancellation signal, a permission precheck, and a fifteen second timeout so it can never hang silently again.

that build worked. then i realized the button itself was a dumb step, so the unlock prompt now pops the moment the app opens. the lesson that stuck is to treat high level sdk wrappers as suspicious until you know which subsystem they route through, because a wrapper around the wrong subsystem is just a polite way to hang forever.