Reputation: 109
I want to get a song URI from Spotify via parameters such as song name and artist name. I've looked through the Android SDK documentation and don't see what I am looking for. I could be wrong though. Currently, the way I get a track playing is by hard coding the URI like this:
mPlayer.playUri(null, "spotify:track:5m578MgxuEC956dulprCe8", 0, 0);
I want to do something along the lines of this, but am not sure if it is possible:
mPlayer.playUri(null, track.getUri, 0, 0);
Any ideas on how to achieve what I described above? Thanks in advance.
Upvotes: 0
Views: 1468
Reputation: 60
On Android you can use Spotify Web API for Android to access the search feature that is a part of Spotify Web Api.
searchTracks() might be the method you need.
Upvotes: 2