Skip to content

Conversation

@vaab
Copy link

@vaab vaab commented Jan 17, 2026

Implement Storage Access Framework (SAF) to allow saving recordings to SD card public directories on Android 10, where traditional file APIs are blocked by Scoped Storage.

Key changes:

  • Add RecordingTarget abstraction for File vs SAF URI targets
  • Add storage location selector in Settings (Internal/SD card/Custom)
  • Launch SAF folder picker when SD card is selected
  • Use DocumentsContract.createDocument() + FileDescriptor for recording
  • Add WavSafNotSupportedException - WAV format unsupported with SAF (requires RandomAccessFile for header updates)
  • Fix resource leak in RecordingTarget.openForWriting()
  • Fix null checks in AppRecorderImpl timer methods
  • Add translations for 8 new strings in all 9 locales

Recordings saved via SAF survive app uninstall, achieving the goal of persistent SD card storage on Android 10.


If this is of any interest, please feel free to re-use. I just wanted persistent SD card storage on Android 10.

@vaab vaab force-pushed the saf-sdcard-storage branch from 943ac12 to 8be71cc Compare January 18, 2026 02:29
Implement Storage Access Framework (SAF) to allow saving recordings to
SD card public directories on Android 10, where traditional file APIs
are blocked by Scoped Storage.

Key changes:
- Add ``RecordingTarget`` abstraction for File vs SAF URI targets
- Add storage location selector in Settings (Internal/SD card/Custom)
- Launch SAF folder picker when SD card is selected
- Use ``DocumentsContract.createDocument()`` + ``FileDescriptor`` for recording
- Add ``WavSafNotSupportedException`` - WAV format unsupported with SAF
  (requires ``RandomAccessFile`` for header updates)
- Fix resource leak in ``RecordingTarget.openForWriting()``
- Fix null checks in ``AppRecorderImpl`` timer methods
- Add translations for 8 new strings in all 9 locales

Recordings saved via SAF survive app uninstall, achieving the goal of
persistent SD card storage on Android 10.
@vaab vaab force-pushed the saf-sdcard-storage branch from 8be71cc to 2d50a47 Compare January 21, 2026 03:55
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.

1 participant