Search in sources :

Example 1 with KeypressRequest

use of com.jaku.request.KeypressRequest in project RoMote by wseemann.

the class SettingsActivity method performKeypress.

private void performKeypress(KeypressKeyValues keypressKeyValue) {
    String url = CommandHelper.getDeviceURL(this);
    KeypressRequest keypressRequest = new KeypressRequest(url, keypressKeyValue.getValue());
    JakuRequest request = new JakuRequest(keypressRequest, null);
    new RequestTask(request, new RequestCallback() {

        @Override
        public void requestResult(RokuRequestTypes rokuRequestType, RequestTask.Result result) {
        }

        @Override
        public void onErrorResponse(RequestTask.Result result) {
        }
    }).execute(RokuRequestTypes.keypress);
}
Also used : RequestTask(wseemann.media.romote.tasks.RequestTask) RokuRequestTypes(wseemann.media.romote.utils.RokuRequestTypes) JakuRequest(com.jaku.core.JakuRequest) RequestCallback(wseemann.media.romote.tasks.RequestCallback) KeypressRequest(com.jaku.request.KeypressRequest)

Example 2 with KeypressRequest

use of com.jaku.request.KeypressRequest in project RoMote by wseemann.

the class RemoteFragment method performKeypress.

private void performKeypress(KeypressKeyValues keypressKeyValue) {
    String url = CommandHelper.getDeviceURL(getActivity());
    KeypressRequest keypressRequest = new KeypressRequest(url, keypressKeyValue.getValue());
    JakuRequest request = new JakuRequest(keypressRequest, null);
    new RequestTask(request, new RequestCallback() {

        @Override
        public void requestResult(RokuRequestTypes rokuRequestType, RequestTask.Result result) {
        }

        @Override
        public void onErrorResponse(RequestTask.Result result) {
        }
    }).execute(RokuRequestTypes.keypress);
}
Also used : RequestTask(wseemann.media.romote.tasks.RequestTask) RokuRequestTypes(wseemann.media.romote.utils.RokuRequestTypes) JakuRequest(com.jaku.core.JakuRequest) RequestCallback(wseemann.media.romote.tasks.RequestCallback) KeypressRequest(com.jaku.request.KeypressRequest)

Example 3 with KeypressRequest

use of com.jaku.request.KeypressRequest in project RoMote by wseemann.

the class TextInputDialog method sendBackspace.

private void sendBackspace() {
    String url = CommandHelper.getDeviceURL(getActivity());
    KeypressRequest keypressRequest = new KeypressRequest(url, KeypressKeyValues.BACKSPACE.getValue());
    JakuRequest request = new JakuRequest(keypressRequest, null);
    new RequestTask(request, new RequestCallback() {

        @Override
        public void requestResult(RokuRequestTypes rokuRequestType, RequestTask.Result result) {
        }

        @Override
        public void onErrorResponse(RequestTask.Result result) {
        }
    }).execute(RokuRequestTypes.keypress);
}
Also used : RequestTask(wseemann.media.romote.tasks.RequestTask) RokuRequestTypes(wseemann.media.romote.utils.RokuRequestTypes) JakuRequest(com.jaku.core.JakuRequest) RequestCallback(wseemann.media.romote.tasks.RequestCallback) KeypressRequest(com.jaku.request.KeypressRequest)

Example 4 with KeypressRequest

use of com.jaku.request.KeypressRequest in project RoMote by wseemann.

the class TextInputDialog method sendStringLiteral.

private void sendStringLiteral(String stringLiteral) {
    String url = CommandHelper.getDeviceURL(getActivity());
    KeypressRequest keypressRequest = new KeypressRequest(url, KeypressKeyValues.LIT_.getValue() + stringLiteral);
    JakuRequest request = new JakuRequest(keypressRequest, null);
    new RequestTask(request, new RequestCallback() {

        @Override
        public void requestResult(RokuRequestTypes rokuRequestType, RequestTask.Result result) {
        }

        @Override
        public void onErrorResponse(RequestTask.Result result) {
        }
    }).execute(RokuRequestTypes.keypress);
}
Also used : RequestTask(wseemann.media.romote.tasks.RequestTask) RokuRequestTypes(wseemann.media.romote.utils.RokuRequestTypes) JakuRequest(com.jaku.core.JakuRequest) RequestCallback(wseemann.media.romote.tasks.RequestCallback) KeypressRequest(com.jaku.request.KeypressRequest)

Example 5 with KeypressRequest

use of com.jaku.request.KeypressRequest in project RoMote by wseemann.

the class CommandService method performKeypress.

private void performKeypress(KeypressKeyValues keypressKeyValue) {
    String url = CommandHelper.getDeviceURL(CommandService.this);
    KeypressRequest keypressRequest = new KeypressRequest(url, keypressKeyValue.getValue());
    JakuRequest request = new JakuRequest(keypressRequest, null);
    new RequestTask(request, new RequestCallback() {

        @Override
        public void requestResult(RokuRequestTypes rokuRequestType, RequestTask.Result result) {
        }

        @Override
        public void onErrorResponse(RequestTask.Result result) {
        }
    }).execute(RokuRequestTypes.keypress);
}
Also used : RequestTask(wseemann.media.romote.tasks.RequestTask) RokuRequestTypes(wseemann.media.romote.utils.RokuRequestTypes) JakuRequest(com.jaku.core.JakuRequest) RequestCallback(wseemann.media.romote.tasks.RequestCallback) KeypressRequest(com.jaku.request.KeypressRequest)

Aggregations

JakuRequest (com.jaku.core.JakuRequest)6 KeypressRequest (com.jaku.request.KeypressRequest)6 RequestCallback (wseemann.media.romote.tasks.RequestCallback)6 RequestTask (wseemann.media.romote.tasks.RequestTask)6 RokuRequestTypes (wseemann.media.romote.utils.RokuRequestTypes)6