use of com.connectsdk.service.capability.TextInputControl.TextInputStatusListener in project butter-android by butterproject.
the class WebOSTVKeyboardInput method connect.
public URLServiceSubscription<TextInputStatusListener> connect(final TextInputStatusListener listener) {
ResponseListener<Object> responseListener = new ResponseListener<Object>() {
@Override
public void onSuccess(Object response) {
JSONObject jsonObj = (JSONObject) response;
TextInputStatusInfo keyboard = parseRawKeyboardData(jsonObj);
Util.postSuccess(listener, keyboard);
}
@Override
public void onError(ServiceCommandError error) {
Util.postError(listener, error);
}
};
URLServiceSubscription<TextInputStatusListener> subscription = new URLServiceSubscription<TextInputStatusListener>(service, KEYBOARD_INPUT, null, true, responseListener);
subscription.send();
return subscription;
}
Aggregations