android-sdk icon indicating copy to clipboard operation
android-sdk copied to clipboard

Synchronous calls are not working

Open bjoe-phi opened this issue 6 years ago • 3 comments

Issue found on 12/02/2019

SDK Version: Android SDK 0.6.0

OS Version: Android 7.0

Steps to reproduce:

The guide at the spotify developers website shows three different ways to make a remote call for getting the playerstate: https://developer.spotify.com/documentation/android/guides/making-remote-calls/ The second and third alternative are working fine but the first one never succeeded and exits with a timeout error.

CallResult<PlayerState> playerStateCall = playerApi.getPlayerState(); Result<PlayerState> playerStateResult = playerStateCall.await(10, TimeUnit.SECONDS); if (playerStateResult.isSuccessful()) { PlayerState playerState = playerStateResult.getData(); // have some fun with playerState } else { Throwable error = playerStateResult.getError(); // try to have some fun with the error }

Expected behaviour:

The code should return the playerstate just like a asynchronous call.

Actual behaviour:

It exits with exits with timeout error.

bjoe-phi avatar Feb 12 '19 09:02 bjoe-phi

I've hit the same issue

phil9064 avatar May 11 '19 09:05 phil9064

I face the same problem. Is it a bug in the SDK? Will it get resolved soon or does anyone know a workaround to run instructions sequentially other than encapsulated Callback functions?

CocaColaLight avatar Jun 15 '19 18:06 CocaColaLight

I'm still encountering the same issues.

calebschoepp avatar Nov 13 '20 03:11 calebschoepp