ConnectSDK / Connect-SDK-Android-Core

Core source code for the Android Connect SDK project
Apache License 2.0
114 stars 79 forks source link

MediaControl.PlayStateListener.onError() called instead of onSuccess() #83

Open softvision-octaviancudalbu opened 8 years ago

softvision-octaviancudalbu commented 8 years ago

Hello,

We have an issue regarding this library (we use 1.6 version):

By selecting any type of media (photo, media or music), we successfully connect to a Roku device, the MediaPlayer.LaunchListener.onSuccess(MediaPlayer.MediaLaunchObject object) gets called. Here we check if we have a MediaPlayer.MediaLaunchObject.mediaControl, and if we do, we register a MediaControl.PlayStateListener to be informed of the media play status The onSuccess(MediaControl.PlayStateStatus object) callback should be called, but instead the onError(ServiceCommandError error) gives us the "com.connectsdk.service.command.NotSupportedServiceCommandError" error object. The error.getCode() returns 0 (zero value) and error.getPayload() returns null, so I don't have any way of knowing what the error means

However, the media selected continues to play, we can select another media and that will also be casted correctly, but each time we select another media, we get the onError(), instead of the onSuccess() callback and we need to know that the Status has changed to PlayStateStatus.Playing

Can you please tell me why this is happening,

Thank you

softvision-octaviancudalbu commented 8 years ago

Hello again,

The issue described above for Android library is still a problem for us, as the Play/Pause behavior on a Roku Streaming Stick 3500X is also affected by the faulty onError(ServiceCommandError error) callback. By not calling the onSuccess(MediaControl.PlayStateStatus object) with the adequate state, we cannot modify our UI accordingly to user actions. I must remind you that the media is played correctly, is just that the callbacks we receive from the library are not called correct, so we get onError instead of onSuccess Can you please investigate this matter

Thank you