spotify / android-sdk

Spotify SDK for Android
https://developer.spotify.com/documentation/android/
Apache License 2.0
470 stars 120 forks source link

ConnectApi extention #61

Open gutrund opened 5 years ago

gutrund commented 5 years ago

Currently it is only possible to switch music to play on the (local) device using connectSwitchToLocalDevice() of the ConnectApi.

I'd love to enable users of my app to choose on which of their devices to play music, as this is the behaviour they know from the Spotify app. Therefore methods like getDevices() and connectSwitchToRemoteDevice(device) would be a good addition to the ConnectApi.

mdelolmo commented 5 years ago

Hi, this is a great suggestion, I will run it by the team. In the meantime, you can use our Web Connect API: https://developer.spotify.com/documentation/web-api/guides/using-connect-web-api/

gabrielittner commented 5 years ago

This is something that would be a great addition to the current APIs. One advantage of having this in the app remote sdk opposed to using the web API would be support for Google cast devices. The web API doesn't support those, but the Spotify Android app does.

itsjustbrian commented 4 years ago

To add to this, it would be great if we could subscribe to what the current device is, or at a minimum read if the local device is being used or not. I think that information would fit comfortably into either the player state or player context subscriptions. You can of course poll the web API, but that's slower, more wasteful, and would run up the rate limit pretty quickly