Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline Playing: What is possible? #2

Closed
panmona opened this issue Mar 27, 2018 · 9 comments
Closed

Offline Playing: What is possible? #2

panmona opened this issue Mar 27, 2018 · 9 comments
Labels

Comments

@panmona
Copy link

panmona commented Mar 27, 2018

In the readme you write:

While certain playback controls work offline and playback can happen offline for offlined content, apps cannot connect and start communicating with Spotify unless there is an internet connection

What does that mean?

I am thinking about making a Spotify alarm clock that must work offline. What would that mean for the apps possible offline capabilities?

@panmona panmona changed the title Offline Playing Offline Playing: What is possible? Mar 27, 2018
@seahorsepip
Copy link

I hope this limitation is about the initial authorization part and an app can control the playback using an access/refresh token even when the device is offline. Otherwise I'll still have to use hacky notification listener mediasession work around >.>°

But this SDK finally gives a way to start playback without hacky intents so I'd rather prefer being abld to use this SDK.

@panmona
Copy link
Author

panmona commented Apr 4, 2018

@seahorsepip

an app can control the playback using an access/refresh token even when the device is offline.

If that is true: that would be really cool.
Let me know if you find this out.

@seahorsepip
Copy link

seahorsepip commented Apr 4, 2018

@maracuja-juice I'll have a look at this SDK when I've actually got time >.<

@panmona
Copy link
Author

panmona commented Apr 4, 2018

@seahorsepip Cool, no problem. I want to do that too.

@arirawr
Copy link
Contributor

arirawr commented Apr 4, 2018

Hey there! Great question.

The device needs an internet connection to be able to authenticate the app and its permissions (like remote-controlling Spotify).
If the user goes offline after a connection has been established, they can still control and play offlined content.

For alarms, you should use a fallback tone in case the app is not able to connect/authenticate to Spotify.

Hope that clarifies things! I'll see if we can make the documentation a little more clear on that.

@arirawr arirawr closed this as completed Apr 4, 2018
@panmona
Copy link
Author

panmona commented Apr 4, 2018

@arirawr So the connection to Spotify only has to be established ONCE or is there also the normal 60 minutes timeout and after the 60 minutes the connection has to be established again?

@arirawr
Copy link
Contributor

arirawr commented Apr 23, 2018

Hey again @maracuja-juice - you should only keep the connection open when you need it, and disconnect accordingly. Keeping it open when it's not needed by the user/app is bad practice as it will prevent the Spotify app from going idle when it's inactive. Check out this guide for more info.

@panmona
Copy link
Author

panmona commented Apr 24, 2018

Okay, thanks. So in short there always needs to be an internet connection on the startup of the app. (or alarm)

@egomezsumma
Copy link

Hi i get the same type of error but when i have no internet connection at all,
One of my goals is to use the sdk playerApi when i got no internet too, beacause i have spotify premium and i can play song going offline, so i think it could be reasonable to spect that.

regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants