Skip to content

feat(bluetooth): add Bluetooth recording#340

Open
longregen wants to merge 1 commit intoFossifyOrg:mainfrom
longregen:feat/bluetooth
Open

feat(bluetooth): add Bluetooth recording#340
longregen wants to merge 1 commit intoFossifyOrg:mainfrom
longregen:feat/bluetooth

Conversation

@longregen
Copy link
Copy Markdown

@longregen longregen commented Mar 7, 2026

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

  • A tab-like selector appears in the recorder fragment when a Bluetooth audio device is detected.
  • I couldn't make the microphone start without also starting the "speaker" (outbound channel). I had to change a "w" for the file descriptor to "rw" because of that.
  • Many little small changes related to testing and reducing log warnings about modern Android incompatibilities. Sorry for taking some liberties here! The debug&test cycle on-device (emulator doesn't have Bluetooth) was a little tedious.
  • Moved isRunning = false into stopRecording() so it's consistently reset, properly clean files and fix a bug that caused always-on screen after recording stops.

Tests performed

  • Open the app, without bluetooth enabled, functionality is the same, no changes.
  • Open the app with bluetooth and a headset, a tab-like selector to allow bluetooth recording is whown
  • Permission is only asked if needed.
  • Device microphone works with no changes in functionality
  • Bluetooth recording works, talked and walked away 10 meters away from the device and volume remains constant
  • Bluetooth can't be tested on emulator. It took me quite a while to figure out how to make it work.

Before & after preview

Before, After, and in light mode
ignoreImageMinify
ignoreImageMinify
ignoreImageMinify

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

@longregen longregen requested a review from naveensingh as a code owner March 7, 2026 16:48
@longregen longregen force-pushed the feat/bluetooth branch 2 times, most recently from 4fdf55b to 460afa8 Compare March 7, 2026 16:52
it also improves Android 12+ compat and reduce warnings on build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can not use Bluetooth headset microphone

1 participant