Skip to content

Add user-selected public recording directory support and settings - #177

Draft
Dimowner wants to merge 7 commits into
masterfrom
feature/select_public_storage_dir
Draft

Dimowner wants to merge 7 commits into
masterfrom
feature/select_public_storage_dir

Conversation

@Dimowner

Copy link
Copy Markdown
Owner

This pull request adds support for handling audio records stored in public directories selected by the user via the Android Storage Access Framework (SAF), which are referenced by content:// URIs. The changes ensure that decoding, playback, sharing, and metadata extraction work seamlessly for both traditional file paths and SAF-based URIs. Additionally, the update includes new tests and minor version increments.

Support for SAF (Storage Access Framework) and content URIs:

  • Updated AudioDecoder and AudioWaveformVisualization to accept a Context and handle both file paths and content:// URIs for decoding, including a new method to read audio metadata from URIs. [1] [2] [3] [4] [5]
  • Modified AudioPlayerNew to accept a Context and play audio from content:// URIs as well as file paths. [1] [2]

File sharing improvements:

  • Refactored AndroidUtils.shareAudioFile and shareAudioFiles to share both file paths and content:// URIs, ensuring compatibility with records stored in public directories. [1] [2]

Test enhancements:

  • Added tests for file name utilities and public recording directory URI handling in PrefsV2ImplTest and FileExtensionsTest. [1] [2]
  • Updated FileDataSourceImplTest to provide preferences when constructing the data source, reflecting the new constructor requirements.

Minor version update:

  • Bumped versionCode and versionName in app/build.gradle.kts to 950 and 2.4.1 respectively.

Decode service updates:

  • Updated DecodeService to pass applicationContext when decoding, supporting both file paths and URIs. [1] [2]

Dimowner added 7 commits July 12, 2026 22:24
… directory the app retains access to previously selected public directory.
# Conflicts:
#	app/src/main/java/com/dimowner/audiorecorder/v2/audio/MediaRecorderBase.kt
#	app/src/main/java/com/dimowner/audiorecorder/v2/data/PrefsV2Impl.kt
#	app/src/main/java/com/dimowner/audiorecorder/v2/di/AppModule.kt
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