From 21a4dbd3150d49d15f48dfcdc38ad2d9e2f37a85 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Wed, 14 Jun 2017 09:27:31 +0200 Subject: add OwnTracks topic --- src/org/traccar/protocol/OwnTracksProtocolDecoder.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/org') 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) { -- cgit v1.2.3