Search in sources :

Example 6 with RequestTask

use of wseemann.media.romote.tasks.RequestTask 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 7 with RequestTask

use of wseemann.media.romote.tasks.RequestTask 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 8 with RequestTask

use of wseemann.media.romote.tasks.RequestTask 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 9 with RequestTask

use of wseemann.media.romote.tasks.RequestTask in project RoMote by wseemann.

the class AltMainActivity method performSearch.

private void performSearch(String searchText) {
    String url = CommandHelper.getDeviceURL(this);
    SearchRequest searchRequest = new SearchRequest(url, searchText, null, null, null, null, null, null, null, null, null);
    JakuRequest request = new JakuRequest(searchRequest, null);
    new RequestTask(request, new RequestCallback() {

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

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

Example 10 with RequestTask

use of wseemann.media.romote.tasks.RequestTask 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)14 RequestCallback (wseemann.media.romote.tasks.RequestCallback)14 RequestTask (wseemann.media.romote.tasks.RequestTask)14 RokuRequestTypes (wseemann.media.romote.utils.RokuRequestTypes)14 KeypressRequest (com.jaku.request.KeypressRequest)6 Device (com.jaku.model.Device)3 DeviceParser (com.jaku.parser.DeviceParser)3 QueryDeviceInfoRequest (com.jaku.request.QueryDeviceInfoRequest)3 SearchRequest (com.jaku.request.SearchRequest)2 Bitmap (android.graphics.Bitmap)1 Channel (com.jaku.model.Channel)1 AppsParser (com.jaku.parser.AppsParser)1 IconParser (com.jaku.parser.IconParser)1 LaunchAppRequest (com.jaku.request.LaunchAppRequest)1 QueryActiveAppRequest (com.jaku.request.QueryActiveAppRequest)1 QueryIconRequest (com.jaku.request.QueryIconRequest)1 List (java.util.List)1 Entry (wseemann.media.romote.model.Entry)1