-
Notifications
You must be signed in to change notification settings - Fork 89
Description
All Google Audio APIs (like MediaExtractor, MediaMetadataRetriever etc.) provide methods to use URI as data source. This library should also accept URIs to handle selection from the filesystem directly without all the boilerplate conversion
Some thoughts about that:
In the waveformSeekbar example a query on contentResolver is used. While this works for a small amount of files, on a large amount of files it's better to use an activityResult/Intent to navigate through the filesystem with another app which returns a URI as result.
@lincollincol has written example code which reads the file and writes it to a cacheDir, but is this really nescessary if the file is in the filesystem?
And than there is this post where the title says that URIs should be accepted, but the code only adds functionality for byte arrays.
Honestly, the whole topic about file paths on Android is a mess. Getting the file path from a URI like described here does not work on all devices and it's really frustrating if you just want to play/visualize audio files.
It would be great if this could be implemented in waveformSeekbar and Amplituda (I will not croospost this because I think @lincollincol from Amplituda is reading this here as well)