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

Network connectivity is always required #8

Open
fotiDim opened this issue Jun 22, 2018 · 11 comments
Open

Network connectivity is always required #8

fotiDim opened this issue Jun 22, 2018 · 11 comments

Comments

@fotiDim
Copy link

fotiDim commented Jun 22, 2018

On every run of my app, even when it has already the necessary permissions for remote control and the track that I attempt to play is already downloaded in the Spotify app, starting that track requires network access. It would be nice if the permissions information was stored locally on the phone and didn't have to go through the network.

@hughrawlinson
Copy link

Hey @fotiDim, thanks for the feedback. I'll ask the team if they have any insights.

@jackfreeman jackfreeman added the suggestion Suggest a change to the SDK label Sep 11, 2018
@kkarayannis
Copy link

Hi Foti! Our team is currently looking into this. I'll post an update here when this is resolved.

@fotiDim
Copy link
Author

fotiDim commented May 6, 2019

@kkarayannis nice to hear that someone is taking care of this. Thanks for the heads up!

@kkarayannis
Copy link

Hey Foti! This is now available in v1.2.0!

@fotiDim
Copy link
Author

fotiDim commented Dec 8, 2019

@kkarayannis I can only partially confirm it. I tried 3 scenarios and only 1 of them works.

  • If the app is already authenticated and I try while offline to play a downloaded song, this works.
  • If the app is already authenticated and I try while offline to play a downloaded song as radio, this fails. The playerAPI?.play callback returns no error but a result instead. However the song is not played.
  • If the app is not authenticated during that session and I try to authenticate, the Spotify app gives me this error. In a prior session the app was already authenticated. It seems that this is not persisted and it needs to go through the online validation process every single time.
    IMG_0032

@kkarayannis
Copy link

Hey Foti. Can you confirm the following:

  • Your app has the latest SDK v1.2.0
  • The Spotify app is version 8.5.30 or later.
  • Your app authenticates once when online.
  • Your app tries to authenticate when offline, no longer than 24 hours after it authenticated online and that the scopes weren't revoked manually in the meantime.

If that doesn't work, could you please try the NowPlayingView demo project in the SDK repo and see if that works for you?

@fotiDim
Copy link
Author

fotiDim commented Dec 11, 2019

@kkarayannis I have triple checked all the above. The NowPlayingView example works for me. I believe I understand now why the different behaviour. I am using SPTSessionManager authentication in my app while NowPlayingView uses built-in authorization. Is offline SPTSessionManager authentication not supported?

@eanntuan
Copy link

Hi @kkarayannis I'm following this thread, and was wondering if the tracks need to be downloaded to the user's device in order for offline playback to work (after first authenticating to Spotify with an internet connection). Thanks!

@kkarayannis kkarayannis removed the suggestion Suggest a change to the SDK label Dec 18, 2019
@kkarayannis
Copy link

@fotiDim Yes, you are correct that SPTSessionManager is not supported for the offline use case.

@eanntuan Yes, tracks need to be downloaded for offline use in the Spotify app beforehand, for offline playback to work.

@fotiDim
Copy link
Author

fotiDim commented Dec 22, 2019

@kkarayannis any plans to support SPTSessionManager? Otherwise it would be nice to state it in the readme.

@kkarayannis
Copy link

There are no plans to support SPTSessionManager. The docs have been updated to de-emphasize the use of SPTSessionManager.

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

No branches or pull requests

5 participants