aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorJan-Piet Mens <jpmens@gmail.com>2017-06-14 09:27:31 +0200
committerJan-Piet Mens <jpmens@gmail.com>2017-06-14 09:27:31 +0200
commit21a4dbd3150d49d15f48dfcdc38ad2d9e2f37a85 (patch)
tree33c3ba94df5123c3a033f12ce6b4981009623a56 /src/org/traccar/protocol
parentd4e075a0b285f70d3c9854120f57ce06888f51e4 (diff)
downloadtraccar-server-21a4dbd3150d49d15f48dfcdc38ad2d9e2f37a85.tar.gz
traccar-server-21a4dbd3150d49d15f48dfcdc38ad2d9e2f37a85.tar.bz2
traccar-server-21a4dbd3150d49d15f48dfcdc38ad2d9e2f37a85.zip
add OwnTracks topic
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/OwnTracksProtocolDecoder.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java
index 61950aef8..a5a9efbb4 100644
--- a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java
+++ b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java
@@ -83,6 +83,9 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder {
if (root.containsKey("batt")) {
position.set(Position.KEY_BATTERY, root.getInt("batt"));
}
+ if (root.containsKey("topic")) {
+ position.set("topic", root.getString("topic"));
+ }
long timestamp = root.getJsonNumber("tst").longValue();
if (timestamp < Integer.MAX_VALUE) {