android-sdk
android-sdk copied to clipboard
Synchronous calls are not working
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.
I've hit the same issue
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?
I'm still encountering the same issues.