use of cl.smartcities.isci.transportinspector.serverConnection.requests.Request in project androidApp by InspectorIncognito.
the class EvaluationQuestionDialog method sendResponse.
private void sendResponse(int answerID, String token) {
EvaluationQuestionRequest request = new EvaluationQuestionRequest(new Request.RequestListener<Pair<Integer, String>>() {
@Override
public void onRequestError() {
}
@Override
public void onRequestResult(@NonNull Pair<Integer, String> response) {
if (response.first != 200) {
Log.d("EvaluationQuestion", "Server couldnt validate the request data");
} else {
Toast.makeText(TranSappApplication.getAppContext(), response.second, Toast.LENGTH_SHORT).show();
}
}
}, token, answerID);
ServerController.sendRequest(request, null);
}
Aggregations