Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tuuhin
Copy link
Owner

@tuuhin tuuhin commented Oct 6, 2024

New Features

  • Location with audio metadata : some audio files allow location to be added with there metadata thus added option to add location info with a recording.
  • Allow external recording : Now the app can read some extra external files of type recording that are created by some other app, this is only available for API-31+ .
  • Rename all files: There was no difficulty in renaming files created by the own app, but now renaming files of different apps is also allowed with proper permissions.

Fixes

  • Fixes with the recording provider all over.
  • The new allow external recording feature is read only , previously meant to also delete files too but this was obsolete, fixed that part.

tuuhin added 7 commits October 2, 2024 09:24
…cordings.

Certain mediaCodec allow to store a location with the recording, so adding that up, the recording location can be viewed on the metadata sheet.
Added option to allow to add location and location permission handling.
AudioSettings.proto allowLocationIfAvailable indicate whether to add a location info.
LocationProvider and CoarseLocationProviderImpl provides the coarse location of the current device.
Some error handling with custom exceptions are added for location errors.
Added LocationInfoCollectionCard along with a dialog to inform why location permission is required.
Same is applied for read phone state permission.
VoiceRecorderImpl uses LocationProvider to fetch the current location and add it ot _recorder configuration.
Location was added to some of the recording if media codec and the user gives proper permission.
LocationAddressProvider uses reverse geocoding to get the approximate location for in human-readable terms.
parseLocationFromString parses the location metadata from the string to BaseLocationModel.
Added translation for the new entries in strings.xml.
Moved extract metadata and evaluateValuesFromCursor functions to get the current recording to PlayerFileProviderImpl as those aren't reused.
Most of the changes are due to package import change.
In AudioBookMarksList check if bookmarks are present then only they can be exported.
In AudioFileMetaDataSheetContent column is replaced with a lazy column,all those extra metadata can't be fixed in a single viewport sized column.
Set buildConfig to true in buildFeatures in build.gradle.kts
And used the buildConfig to show version rather than package info.
…cordings.

In VoiceRecordingsProvider added an extra method that only queries for only owner level recordings. ie, the recordings belonging to this app.
Reading external recordings will be only allowed if the device is api level 31+ and only the recordings folder, only the metadata available will be read.
Added RecordedVoiceModel.owner which determines which app created this recording,owner helps with working with files as android scoped storage has a lot of restrictions.
In TrashRecordingsProvider implementations , its make sure that we trash's or delete recordings created by this app only otherwise Resource.Error of CannotTrashFileDifferentOwnerException is thrown.
And tried to use of concurrent features of coroutines.
Some renaming on Screen Events associated with SecurityExceptions to delete external files yes we can delete them but its not proper job for this app.
Added data with Resource as this data will prevent mutations in the workflow.
RecordingsProvider changes are added as per requirements for VoiceRecordingsProvider and TrashRecordingsProvider.
Changed the relative path for the recordings previously they were stored on MUSIC dir but on API 31+ we have a RECORDINGS dir.
Again for this simple change FileSettings proto AudioSettingsViewModel FileSettings.kt and similar files are edited.
Some classes are renamed to simpler terms.
Delete Recordings will not always happen via MediaStore.createDeleteRequest rather than only normal mode, as these files owner is always this same package.
Added settings dependency in VoiceRecordingsProviderImpl to allow external recordings or not.
Rename feature is not yet done, as external files can also be renamed need to handle that use case, it will be looked later for the meantime it cant be done.
UpdateRecordingPathWorker updated the recording path to use the Environment.DIRECTORY_RECORDINGS.
In .gitignore added .kotlin which contains some session and log files which are not needed.
The rename_dialog should allow recordings to be renames if there is a security excepting the user is prompted to write request on the file if allowed then rename is possible.
Recordings are prefilled from the previous name if the recording id is available.
On RecordingCard its mentioned that its from another app.
The flow is made similar to trashing non owner recordings.
Added some bn translations.
Fixed saving the content of the file in RecorderFileProviderImpl, we need to save bytes not text.
Don't know but deleting matching media-store  entries together via content resolver has no effect, thus need to delete them one by one.
@tuuhin tuuhin merged commit a686613 into main Oct 6, 2024
@tuuhin tuuhin deleted the v4 branch October 6, 2024 17:06
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.

2 participants