Announcements

Using Spotify Connect with the Android API

Reply
Highlighted

Using Spotify Connect with the Android API

Casual Listener

Plan

Premium

Country

United States of America

Device

Nook HD (Running CyanogenMod)

Operating System

Android 6.0.1

 

My Question or Issue

Hi all, I have been trying to develop a very simple app to be used with the spotify API for android that simply starts a playlist of my choosing when a button is pushed. This is easy enough by itself, but part of the documentation that I can't find is whether it is possible to start immediately playing that music on a spotify connect capable device through the API. This is a smart home application which relies on being able to do something like this. 

 

Is something like this possible?

3 Replies
Highlighted

Re: Using Spotify Connect with the Android API

Rock Star 16
Rock Star 16

Hey @mathewwe, thanks for reaching out on the Spotify Community for help!

 

Hmm, I did some digging and found this: https://spotify.github.io/android-sdk/app-remote-lib/docs/com/spotify/android/appremote/api/ConnectA.... Perhaps you could use the Connect API from the Android SDK? Let me know if that helps!

 

Happy coding,

Hubo

HuboRock Star 16
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.
Highlighted

Re: Using Spotify Connect with the Android API

Casual Listener

Hey @Hubo,

 

Unfortunately it doesn’t look like this part of the API will be much help. It looks like this will only do the opposite of what I want to do, as the only function in this class is to ensure that music is playing on this device rather than some device that I know the ID of. I know it’s possible in the web API, are there equivalent functions for everything in the Android API?

 

Highlighted

Re: Using Spotify Connect with the Android API

Rock Star 16
Rock Star 16

Hey @mathewwe, thanks for getting back to me!

 

Sorry about that, I can't find any endpoints in the Android SDK Docs to initiate a Spotify Connect session. If this is something you'd like to see, I recommend creating a new idea on the Spotify Community. That way, Spotify can keep track of it. 

 

Let me know if you have any questions.

 

Have a good one!

Hubo

HuboRock Star 16
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.
SUGGESTED POSTS