I started looking into william-seemann's answer and it led me to this: tDataSource(String path) no longer accepts URLsĬomment #2 on this post mentions using a different version of setDataSource() that still accepts remote URLs. I'm hoping I'm just parsing the URI incorrectly, but I'm out of ideas.Īny suggestions? Also, is there a better way to do this entirely when pulling from a UPnP server? FWIW, I'm using the Cling UPnP library. The second and third attempts are using the "res" value from the UPnP metadata, which points to the actual file on the server. All albums have a folder.jpg file in their directory. All but one of these composers have only one album associated with them (no idea if this is relevent). For about 10 composers no artwork is displayed. The first one is the albumArtURI pulled from the UPnP metadata (no *.mp3 extension, but the file will download if pasted into a web browser). There are 345 composers and artwork displays for most of them. However, any of the following fail with the same error: tDataSource(appCtx, Uri.parse("")) The following works since it's a direct file path on the device itself: tDataSource("/sdcard/Music/Daft_Punk/Homework/01 - Daftendirekt.mp3") MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever() Each way I try it, I keep getting an IllegalArgumentException by the call to MediaMetadataRetriever#setDataSource, which indicates that my file handle or URI is invalid. I've read that MediaMetadataRetriever is useful for this kind of thing, but I haven't been able to get it to work. Since the actual MP3 files aren't sent to the Android device, I'd like to be able to get the album art of the currently playing file without having to download the entire MP3 file to my phone. I'm currently writing a UPnP remote control app which is used to connect a remote MediaServer to a remote MediaRenderer.
0 Comments
Leave a Reply. |