Search in sources :

Example 6 with WebOSWebAppSession

use of com.connectsdk.service.sessions.WebOSWebAppSession in project butter-android by butterproject.

the class WebOSTVService method joinWebApp.

@Override
public void joinWebApp(final LaunchSession webAppLaunchSession, final WebAppSession.LaunchListener listener) {
    final WebOSWebAppSession webAppSession = this.webAppSessionForLaunchSession(webAppLaunchSession);
    webAppSession.join(new ResponseListener<Object>() {

        @Override
        public void onError(ServiceCommandError error) {
            Util.postError(listener, error);
        }

        @Override
        public void onSuccess(Object object) {
            Util.postSuccess(listener, webAppSession);
        }
    });
}
Also used : JSONObject(org.json.JSONObject) ServiceCommandError(com.connectsdk.service.command.ServiceCommandError) WebOSWebAppSession(com.connectsdk.service.sessions.WebOSWebAppSession)

Aggregations

WebOSWebAppSession (com.connectsdk.service.sessions.WebOSWebAppSession)6 ServiceCommandError (com.connectsdk.service.command.ServiceCommandError)4 JSONObject (org.json.JSONObject)4 ResponseListener (com.connectsdk.service.capability.listeners.ResponseListener)2 ServiceCommand (com.connectsdk.service.command.ServiceCommand)2 LaunchSession (com.connectsdk.service.sessions.LaunchSession)2 JSONException (org.json.JSONException)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1