Reputation: 436
I know that you can start a specific song using the following:
String uri = "spotify:track:308p4aUi2JKGC0i750B2JM";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
And I know that you can start a radio channel on the desktop app by searching for:
spotify:radio:track:308p4aUi2JKGC0i750B2JM
However when I try to start the radio by doing something similar:
String uri = "spotify:radio:track:308p4aUi2JKGC0i750B2JM";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
Nothing happens...
Does anyone know how to do this? Is it even possible?
Thanks
Upvotes: 2
Views: 1002
Reputation: 40380
Disclaimer: I work for Spotify
Upon examination of the Android app's source code, it seems that launching the radio is done with an internal intent. In other words, via an unpublished URI scheme which is unpublished because it is subject to change between versions.
I'm not sure if this is a feature which is planned for the mobile clients, though I'll certainly ask around internally about it. I would encourage making a thread on the community forums (they do get read) pushing for it as well.
Update: Apparently the reason for using an internal URI scheme is that when the radio feature was developed for the Android app, the URI scheme was not completely finalized. The team seems interested in fixing this behavior, and I've filed a JIRA ticket as a reminder for them.
Upvotes: 3