spotify / android-sdk

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

How do I know when the spotify app has selected remote-device? #354

Open viclinex opened 5 months ago

viclinex commented 5 months ago

SDK Version: 13

OS Version: Android

Scope(s): Spotify-app-remote

Steps to reproduce:

I want to connect the device to Spotify and play songs in my app. I confirmed that the current device is exposed through my app in the "Select a device" list. At this time, it was confirmed that /apps/com.spotify.Spotify.TVv2 was requested via GET from WebSocket.

I would like to display a login page and screen when a device is selected in "Select a device", but no message is received when selected. The GET message only comes when the Spotify app is launched for the first time, and at that point, it does not seem appropriate to generate a login page because it is before selecting the device in “Select a device”. Is there a callback or message that lets me know when the actual device is selected?

To put it more simply, I am currently developing a service app using the DiAL protocol, and GET in "httpServeltRequest" occurs only once when the Spotify app is first started, and POST does not occur when the device is connected, so I cannot determine when the user attempts to connect. I don't know.

There is no explanation on the Android developer page, so I am asking here.