You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially the OS is blocking the Spotify app from starting the auth activity from the background.
An easy workaround that also proves this is the issue is to connect to Spotify (e.g from a service) while the Spotify app is in the foreground, which works fine.
I assume it used to work since android allows background activity starts if your app has a service that is bounded from a foreground app.
BUT, on OS 14 google added this restriction: Starting from Android 14, if the app bound to the service is targeting Android 14 or higher, it no longer allows the app that has the service to start a background activity by default. The app has to pass the flag Context.BIND_ALLOW_ACTIVITY_STARTS to allow the bound service app to start background activities.
I suspect it has something to do with this limitation added on OS 14, but someone from the Spotify team needs to verify this.
The text was updated successfully, but these errors were encountered:
This SDK is not compatible with Android 14. Please address this issue as soon as possible.
After around 15 minutes, its throws "PlatformException(errorConnection, Something went wrong connecting spotify remote, com.spotify.protocol.error.SpotifyAppRemoteException: Result was not delivered on time., null)"
Using the connect method from the remote library hangs without any callback.
Looking at the logs you can see that:
Essentially the OS is blocking the Spotify app from starting the auth activity from the background.
An easy workaround that also proves this is the issue is to connect to Spotify (e.g from a service) while the Spotify app is in the foreground, which works fine.
I assume it used to work since android allows background activity starts if your app has a service that is bounded from a foreground app.
BUT, on OS 14 google added this restriction:
Starting from Android 14, if the app bound to the service is targeting Android 14 or higher, it no longer allows the app that has the service to start a background activity by default. The app has to pass the flag Context.BIND_ALLOW_ACTIVITY_STARTS to allow the bound service app to start background activities.
I suspect it has something to do with this limitation added on OS 14, but someone from the Spotify team needs to verify this.
The text was updated successfully, but these errors were encountered: