From a17aaf1a9e11e6499c5da06f0e580cde6729f450 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 25 Aug 2015 16:41:16 +1200 Subject: Add web handler status code --- src/org/traccar/WebDataHandler.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/org/traccar/WebDataHandler.java b/src/org/traccar/WebDataHandler.java index e2916d9bc..5f12b9c93 100644 --- a/src/org/traccar/WebDataHandler.java +++ b/src/org/traccar/WebDataHandler.java @@ -61,13 +61,14 @@ public class WebDataHandler extends BaseDataHandler { Device device = Context.getIdentityManager().getDeviceById(position.getDeviceId()); - String request = url. - replace("{uniqueId}", device.getUniqueId()). - replace("{deviceId}", String.valueOf(device.getId())). - replace("{fixTime}", String.valueOf(position.getFixTime().getTime())). - replace("{latitude}", String.valueOf(position.getLatitude())). - replace("{longitude}", String.valueOf(position.getLongitude())). - replace("{gprmc}", formatSentence(position)); + String request = url + .replace("{uniqueId}", device.getUniqueId()) + .replace("{deviceId}", String.valueOf(device.getId())) + .replace("{fixTime}", String.valueOf(position.getFixTime().getTime())) + .replace("{latitude}", String.valueOf(position.getLatitude())) + .replace("{longitude}", String.valueOf(position.getLongitude())) + .replace("{gprmc}", formatSentence(position)) + .replace("{statusCode}", position.getSpeed() < 1.0 ? "0xF020" : "0xF11C"); Context.getAsyncHttpClient().prepareGet(request).execute(); -- cgit v1.2.3