aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/OsmAndProtocolDecoder.java
diff options
context:
space:
mode:
authorKevin Goos <kevingoos@telenet.be>2018-07-18 15:48:32 +0200
committerKevin Goos <kevingoos@telenet.be>2018-07-18 15:48:32 +0200
commitc6d6288d37a000cf364dce4753c24924f9fcc7de (patch)
tree9277912fdfb3ed74a704dec6d3968f34244b827b /src/org/traccar/protocol/OsmAndProtocolDecoder.java
parentab81b1434504d9ed288079f2cf0eb81aaffa668c (diff)
downloadtrackermap-server-c6d6288d37a000cf364dce4753c24924f9fcc7de.tar.gz
trackermap-server-c6d6288d37a000cf364dce4753c24924f9fcc7de.tar.bz2
trackermap-server-c6d6288d37a000cf364dce4753c24924f9fcc7de.zip
Added integer checking for valid in osmand
Diffstat (limited to 'src/org/traccar/protocol/OsmAndProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java8
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 {