aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-25 16:41:16 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-25 16:41:16 +1200
commita17aaf1a9e11e6499c5da06f0e580cde6729f450 (patch)
treeb1477f5f02cd8cc41bd0e34ced075b7e7c049ef6 /src/org
parent763c2fac94e48c1a96b5d3bd1949e91dbca0a7f8 (diff)
downloadtraccar-server-a17aaf1a9e11e6499c5da06f0e580cde6729f450.tar.gz
traccar-server-a17aaf1a9e11e6499c5da06f0e580cde6729f450.tar.bz2
traccar-server-a17aaf1a9e11e6499c5da06f0e580cde6729f450.zip
Add web handler status code
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/WebDataHandler.java15
1 files changed, 8 insertions, 7 deletions
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();