ConnectSDK Android

773 Views Asked by At

Working with connectSDK Android for casting videos on samsung android Tv. I've successfully launch the default youtube app and played as well. But when ever i'm trying to stop the currently running Youtube video getting a response code = 400 i.e

com.connectsdk.service.command.ServiceCommandError: Bad Request

Anyone worked on this? or familiar with the issue?

Code:

if (runningAppSession != null) {    
    if (runningAppSession.getSessionType() == LaunchSessionType.App) {
        getLauncher().closeApp(runningAppSession, new ResponseListener<Object>() {
            @Override
            public void onError(ServiceCommandError error) {
                System.out.println(error);                  
            }

            @Override
            public void onSuccess(Object object) {
                System.out.println(object.toString());
            }
        });
    }
}
0

There are 0 best solutions below