BAR is a simple Android audio recording app forked from BCR, with the microphone quick settings tile concept based on on this pull request from the original author.
I've decided to fork because BCR has a robust audio recording/encoding pipeline that supports multiple output formats and accounts for many edge cases and failure conditions that other apps may ignore. BAR records from a selectable Android microphone input source. The output files are saved with a _mic suffix in the output directory.
- Supports Android 13 through 17
- Supports output in various formats:
- OGG/Opus - Lossy, smallest files, default
- M4A/AAC - Lossy, smaller files
- FLAC - Lossless, larger files
- WAV/PCM - Lossless, largest files, least CPU usage
- Supports Android's Storage Access Framework (can record to SD cards, USB devices, etc.)
- Quick settings toggle
- Material You dynamic theming
- No network access permission
- No third party dependencies
BAR tries to keep format settings practical instead of pretending that every encoder option is equally useful.
For M4A/AAC, the bitrate range depends on the selected sample rate and channel count. The ranges,
defaults, and AAC-LC/HE-AAC/HE-AAC v2 switch points are based on the Fraunhofer FDK AAC encoder
documentation available in Android's source tree:
aac/documentation/aacEncoder.pdf.
BAR therefore offers AAC at 44100 Hz and 48000 Hz, where those tables are defined.
FLAC is handled differently because it is lossless. Its setting is a compression level, not an audio quality slider: level 0 is fastest and creates larger files, while higher levels spend more CPU to make smaller files without changing the decoded audio. BAR defaults to the highest level because modern devices can normally handle it during recording.
OGG/Opus does not offer 44100 Hz in BAR because that sample rate is not available for the Opus path used here, so the app only shows the supported Opus sample rates.
BAR also includes an advanced diagnostic screen for estimating a device's native microphone sample
rate. Android does not expose a direct, reliable API for this, so BAR uses a buffer-size heuristic:
it compares AudioRecord.getMinBufferSize() results for 48000 Hz and 44100 Hz across common input
channel configurations. This is not a native Android sample-rate query and should not be treated as
absolute proof. So far, however, testing has matched known and observed device behavior: a Pixel 9
Pro reports like a 48000 Hz device, while a Pixel 4 reports like a 44100 Hz device.
As the name alludes, BAR intends to be a basic as possible. The project will have succeeded at its goal if the only updates it ever needs are for compatibility with new Android versions. Thus, many potentially useful features will never be implemented, such as:
- Changing the filename format
- Support for old (unsupported) Android versions (support is dropped as soon as maintenance becomes cumbersome)
- Support for direct boot mode (the state before the device is initially unlocked after reboot)
- Releases are not published yet. Once v1.0 is available, download it from thereleases page.
-
Install BAR.
-
Open BAR.
-
Grant the required microphone and notification permissions when prompted.
-
Pick an output directory. If no output directory is selected or if the output directory is no longer accessible, then recordings will be saved to
/sdcard/Android/data/com.patrykmis.bar/files.
BAR will prompt for microphone and notification (Android 13+) permissions. They are required for BAR to be able to record in the background.
BAR can be built like most other Android apps using Android Studio or the gradle command line.
To build the debug APK:
./gradlew assembleDebugThe output file is written to app/build/outputs/apk/debug/. The APK will be signed with the default autogenerated debug key.
To create a release build with a specific signing key, set up the following environment variables:
export RELEASE_KEYSTORE=/path/to/keystore.jks
export RELEASE_KEY_ALIAS=alias_name
read -r -s RELEASE_KEYSTORE_PASSPHRASE
read -r -s RELEASE_KEY_PASSPHRASE
export RELEASE_KEYSTORE_PASSPHRASE
export RELEASE_KEY_PASSPHRASEand then build the release APK:
./gradlew assembleReleaseBug fix and translation pull requests are welcome and much appreciated!
If you are interested in implementing a new feature and would like to see it included in BAR, please open an issue to discuss it first. I intend for BAR to be as simple and low-maintenance as possible, so I am not too inclined to add any new features, but I could be convinced otherwise.
BAR is licensed under GPLv3. Please see LICENSE for the full license text.