Open Rudd-O opened 4 years ago
Just to be clear — that test with the temporary file is probably easy to fix: just have the test actually write a proper MP3 (even if one second long) as the temporary file, with the proper .mp3
extension. That ought to work. The reason it will work is because the Android OS is actually detecting the content type of the file being written, and barfing an error back to the app if the file written isn't a media file, given that the target directory is exclusively for media files.
Hello. If the default directory is used, when I instruct Audinaut to cache a song, it won't do it. It also won't work in
/storage/emulated/0/Music
because the app attempts to create a temporary file which is actuallyapplication/octet-stream
and that results in an IllegalArgumentException.I had to change
.../media/
to.../data/
in the path for it to work. Unfortunately that prevents other music apps from seeing and playing the music downloaded by AudinautIt's likely your app will have to request file management permission for it to work correctly with any folder outside the app's data folder.