I'm trying to get song metadata with the Spotify Android SDK without buffering the song. Here's my code:
public String getTitleFromURI(String uri) {
//uri = "spotify:track:6ORqU0bHbVCRjXm9AjyHyZ"
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
Uri temp = Uri.parse(uri);
System.out.println("URI: " + temp + "\n");
retriever.setDataSource(uri); // java.lang.IllegalArgumentException
return retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE);
}
I'm unsure as to why I'm receiving an illegal argument exception.
Ended up using this: https://github.com/kaaes/spotify-web-api-android
Thanks for your help!