pediatric-ai-scribe-v3/public
Daniel f31afcdbf4 Fix biometric login, and keep recording alive across screen lock
Biometric sign-in has never worked. auth.js drove
window.Capacitor.Plugins.NativeBiometric — the API of
capacitor-native-biometric, which is not a dependency of this project. The
installed plugin is @aparajita/capacitor-biometric-auth, registered as
BiometricAuthNative with an entirely different API and no credential
storage at all. bioPlugin() therefore always returned null, bioAvailable()
always resolved {ok:false}, and the button was never revealed.

Rewritten against what is actually installed, with no new dependency:
BiometricAuthNative (checkBiometry/authenticate) presents the prompt, and
the already-working SecureStoragePlugin — via the window.SecureStorage
wrapper — holds the credentials. Credentials are only read after
authenticate() resolves, so the OS still gates access. biometryType is a
numeric enum in this plugin, so the old FACE_ID/TOUCH_ID string maps are
replaced with a single lookup exposed as typeName.

Secure storage itself was fine and is unchanged: SecureStoragePlugin
matches the name the wrapper looks up and is registered in
capacitor.settings.gradle.

Recording across screen lock: window.nativeKeepAwake() called Capacitor's
KeepAwake plugin, which is also not installed here, so it silently did
nothing and the device slept mid-encounter — taking the WebView's
MediaRecorder with it. keepAwake() is now a method on the existing
NativeRecording JavascriptInterface, which sets FLAG_KEEP_SCREEN_ON, and
is bound to the WebView so it survives the launcher's navigation to the
remote origin. The Capacitor plugin remains a fallback.

If the screen is locked anyway (power button, incoming call), the activity
pauses and Chromium throttles timers for hidden WebViews, starving
MediaRecorder's chunk delivery. MainActivity now calls resumeTimers() on
pause while recording. The foreground service was already correct — it
holds a partial wake lock and declares FOREGROUND_SERVICE_TYPE_MICROPHONE.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 01:12:47 +02:00
..
.well-known Add SHA256 fingerprint to assetlinks.json for TWA domain verification 2026-03-29 00:32:58 +00:00
audio Match TTS voices to the selected LiteLLM model 2026-07-30 17:34:34 +02:00
components Match TTS voices to the selected LiteLLM model 2026-07-30 17:34:34 +02:00
css Match TTS voices to the selected LiteLLM model 2026-07-30 17:34:34 +02:00
data move pe guide data to json 2026-05-08 08:56:21 +02:00
icons Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
images/pe-guide feat(pe-guide): real audio, innocent-murmur panel, APTM image, all-ages resp+CV 2026-04-22 21:00:42 +02:00
img feat: Bedside clinical reference module + age→weight estimator + dose-math unit tests 2026-04-20 02:49:42 +02:00
js Fix biometric login, and keep recording alive across screen lock 2026-07-31 01:12:47 +02:00
vendor stabilize assistant and add diagrams 2026-05-08 00:23:00 +02:00
404.html rebrand to Pediatric Clinical Tools, add diagrams tab, simplify litellm transcribe/tts 2026-05-02 18:23:06 +02:00
e2e-harness.html fix(nav): move image lightbox to index.html so NRP + seizure pathways 2026-04-23 18:58:38 +02:00
favicon.ico Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
index.html Fix Turnstile in the mobile app; drop it from login 2026-07-30 17:22:03 +02:00
manifest.json rebrand to Pediatric Clinical Tools, add diagrams tab, simplify litellm transcribe/tts 2026-05-02 18:23:06 +02:00
sw.js harden clinical assistant source handling 2026-05-09 19:59:04 +02:00
template-guide.md feat: add extension import preview 2026-05-08 22:26:53 +02:00