Record and Play Audio in React Native

Recording and playback features need careful platform decisions before UI work begins. This React Native guide now separates Expo Audio, bare React Native packages, permissions, file storage, cleanup, and product rules for voice notes or media workflows.
Quick Answer
For Expo and Expo modules apps, start with expo-audio for playback and recording. For bare React Native apps, choose a maintained native audio package only after confirming permissions, background behavior, file storage, and platform audio-session requirements.
Audio features become product infrastructure quickly: voice notes need upload retries, file retention, consent copy, moderation, waveform/progress state, and cleanup when users delete content.
Audio Checklist
- Request microphone permission only when recording is needed.
- Store recordings where the app can manage retention and deletion.
- Stop, unload, or release recorders and players on navigation changes.
- Test interruptions, Bluetooth changes, screen lock, and app backgrounding.
- Avoid recording sensitive audio without clear consent and retention rules.
Production Guidance: Pick the Audio Stack Before Writing UI
Audio recording is no longer just a component problem. Decide first whether the app is Expo-managed, bare React Native, or a hybrid development build. Expo apps should evaluate the current expo-audio APIs, while bare apps need native permission handling, background-mode decisions, file storage, and platform-specific audio-session behavior.
For MVPs, keep the scope small: record, show duration, save the file URI, play it back, and clean up resources when the screen unmounts. For production voice notes, add upload retries, waveform or progress state, server-side file limits, moderation rules, and privacy copy.