aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/WebDataHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/WebDataHandler.java')
-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();