use of cl.smartcities.isci.transportinspector.serverConnection.requests.pullRequests.GetUUIDRequest in project androidApp by InspectorIncognito.
the class ServerSentBus method createBus.
public static void createBus(final String licensePlate, final String service, final ConstructorListener listener) {
Request.RequestListener<String> requestListener = new Request.RequestListener<String>() {
@Override
public void onRequestError() {
}
@Override
public void onRequestResult(@NonNull String machineUUID) {
int color = new ServiceHelper(TranSappApplication.getAppContext()).getColorId(service);
listener.busConstructed(new ServerSentBus("left", service, "", machineUUID, "", licensePlate, 0, 0, 0, color, 0, "", new ArrayList<ServerSentEvent>()));
}
};
Request<String> request = new GetUUIDRequest(requestListener, licensePlate);
ServerController.sendRequest(request, null);
}
use of cl.smartcities.isci.transportinspector.serverConnection.requests.pullRequests.GetUUIDRequest in project androidApp by InspectorIncognito.
the class Bus method createBus.
private static void createBus(final String licensePlate, final String service, final ConstructorListener listener) {
Request.RequestListener<String> requestListener = new Request.RequestListener<String>() {
@Override
public void onRequestError() {
}
@Override
public void onRequestResult(@NonNull String response) {
try {
listener.busConstructed(new Bus(service, licensePlate, response));
} catch (JSONException ignored) {
}
}
};
Request<String> request = new GetUUIDRequest(requestListener, licensePlate);
ServerController.sendRequest(request, null);
}
Aggregations