From 9d87d69d1d4cd322bc58d95b44789eb085126466 Mon Sep 17 00:00:00 2001 From: Louis Fontaine Date: Sun, 29 Mar 2026 21:45:08 +0200 Subject: [PATCH] fix(android): enable background recording via expo-audio foreground service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass enableBackgroundRecording: true to the expo-audio config plugin so it wires up the AudioRecordingService foreground service on Android. Also add POST_NOTIFICATIONS permission required by the service notification. Without the plugin option, enableBackgroundRecording defaults to false and the recorder's useForegroundService flag is never set, so Android kills the microphone when the screen turns off. Requires a native rebuild — not deliverable via OTA update. Co-Authored-By: Claude Sonnet 4.6 --- app.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index 38185bb..f26641e 100644 --- a/app.json +++ b/app.json @@ -32,7 +32,8 @@ "android.permission.RECORD_AUDIO", "android.permission.MODIFY_AUDIO_SETTINGS", "android.permission.FOREGROUND_SERVICE", - "android.permission.FOREGROUND_SERVICE_MICROPHONE" + "android.permission.FOREGROUND_SERVICE_MICROPHONE", + "android.permission.POST_NOTIFICATIONS" ] }, "web": { @@ -43,7 +44,13 @@ "plugins": [ "expo-router", "expo-secure-store", - "expo-audio" + [ + "expo-audio", + { + "microphonePermission": "VoiceKeeper needs microphone access to record voice notes.", + "enableBackgroundRecording": true + } + ] ], "extra": { "router": {},