📚 Encyclopedia

Android · updated 2026-11-02

Recording audio and video on Android into MediaStore

androidmediarecordercameraxmediastoreforeground-servicemicrophonescoped-storage

A recorder app has three jobs: capture without being killed, save where the user and other apps can find the result, and handle the camera's orientation. This comes from Justin's Studio app (io.jhampton.studio, Kotlin + Compose + CameraX, 2026-10-29). Verified on the emulator's virtual cameras; real-hardware behavior (stereo mics, 4K, long screen-off recordings) was still unchecked at the time of writing.

Saving into the shared MediaStore

Audio with MediaRecorder

Video with CameraX

Playback

Hide system bars and unlock rotation while a video plays full screen, and keep the sound on/off toggle visible at every screen size (hardware volume keys cannot clear a mute).

See also

Sources: studio memory, repo ~/dev/studio (0.1.0), tldr post #1872