fix(android): request POST_NOTIFICATIONS permission for background recording - #50
Merged
Merged
Conversation
…ervice 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 <noreply@anthropic.com>
…cording On Android 13+, POST_NOTIFICATIONS is a runtime permission. Without requesting it explicitly, the foreground service notification cannot be shown, causing Android to kill the recording when the screen locks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📱 Preview Update ReadyBranch: Scan to open in Expo Go
|
Activates keep-awake when recording starts and deactivates it on stop, cancel, or screen unmount. Prevents the screen from sleeping mid-recording while still allowing the user to manually lock the device. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST_NOTIFICATIONSruntime permission on Android 13+ before starting recordingexpo-keep-awake(deactivated on stop, cancel, or unmount)Why
Background recording fix: On Android 13+,
POST_NOTIFICATIONSis a runtime permission — declaring it in the manifest is not enough. TheAudioRecordingServiceforeground service needs to show a notification to keep recording alive in the background. If the notification permission isn't granted,startForeground()silently fails and Android terminates the recording when the screen locks.Keep awake: Prevents the screen from going to sleep mid-recording so users can monitor the timer and waveform. The user can still manually lock the device.
Test plan
🤖 Generated with Claude Code