use of com.jaku.parser.AppsParser in project RoMote by wseemann.
the class NotificationService method sendStatusCommand.
private void sendStatusCommand() {
String url = CommandHelper.getDeviceURL(this);
QueryActiveAppRequest queryActiveAppRequest = new QueryActiveAppRequest(url);
JakuRequest request = new JakuRequest(queryActiveAppRequest, new AppsParser());
new RequestTask(request, new RequestCallback() {
@Override
public void requestResult(RokuRequestTypes rokuRequestType, RequestTask.Result result) {
List<Channel> channels = (List<Channel>) result.mResultValue;
if (channels.size() > 0) {
mChannel = channels.get(0);
getAppIcon(mChannel.getId());
}
}
@Override
public void onErrorResponse(RequestTask.Result result) {
Log.d(TAG, "That didn't work!");
}
}).execute(RokuRequestTypes.query_active_app);
}
Aggregations