diff options
author | Kevin Goos <kevingoos@telenet.be> | 2018-07-18 15:48:32 +0200 |
---|---|---|
committer | Kevin Goos <kevingoos@telenet.be> | 2018-07-18 15:48:32 +0200 |
commit | c6d6288d37a000cf364dce4753c24924f9fcc7de (patch) | |
tree | 9277912fdfb3ed74a704dec6d3968f34244b827b | |
parent | ab81b1434504d9ed288079f2cf0eb81aaffa668c (diff) | |
download | traccar-server-c6d6288d37a000cf364dce4753c24924f9fcc7de.tar.gz traccar-server-c6d6288d37a000cf364dce4753c24924f9fcc7de.tar.bz2 traccar-server-c6d6288d37a000cf364dce4753c24924f9fcc7de.zip |
Added integer checking for valid in osmand
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index c75e9519c..94055a282 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -70,7 +70,13 @@ public class OsmAndProtocolDecoder extends BaseHttpProtocolDecoder { position.setDeviceId(deviceSession.getDeviceId()); break; case "valid": - position.setValid(Boolean.parseBoolean(value)); + if (value == "1") { + position.setValid(true); + } else if (value == "0") { + position.setValid(false); + } else { + position.setValid(Boolean.parseBoolean(value)); + } break; case "timestamp": try { |