release ICL02ProtocolV2 V632
authorsnickersun <scy@incartech.cn>
Thu, 24 Sep 2020 10:52:55 +0000 (18:52 +0800)
committersnickersun <scy@incartech.cn>
Thu, 24 Sep 2020 10:52:55 +0000 (18:52 +0800)
给 BLE扫描结果 增加 try catch ,增强健壮性。

app/release/ICSer_V632_2009241851_release.apk [moved from app/release/ICSer_V630_2009241845_release.apk with 78% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/LocationClient.java
app/version_code.properties

similarity index 78%
rename from app/release/ICSer_V630_2009241845_release.apk
rename to app/release/ICSer_V632_2009241851_release.apk
index d70f8f1..a143897 100644 (file)
Binary files a/app/release/ICSer_V630_2009241845_release.apk and b/app/release/ICSer_V632_2009241851_release.apk differ
index 05c732c..7658698 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":630,"versionName":"2009241845","enabled":true,"outputFile":"ICSer_V630_2009241845_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V630_2009241845_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":632,"versionName":"2009241851","enabled":true,"outputFile":"ICSer_V632_2009241851_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V632_2009241851_release.apk","properties":{}}]
\ No newline at end of file
index f6a9f9a..151a44b 100644 (file)
@@ -137,19 +137,23 @@ public class LocationClient {
       public void OnScanFinished(ArrayList<String> btPairedScanResult, ArrayList<String> btNewScanResult) {\r
 \r
         if (btNewScanResult.size() > 0) {\r
-          ICLogger.i("found bt mac " + btNewScanResult.size()+" btMacList "+runtime.bleInfo.btMacList.size());\r
+          ICLogger.i("found bt mac " + btNewScanResult.size() + " btMacList " + runtime.bleInfo.btMacList.size());\r
           boolean in_area = false;\r
-          for (String mac : btNewScanResult) {\r
-            ICLogger.i("bt mac "+mac.replace(":","").toLowerCase()+"  "+mac.toLowerCase());\r
-            String tmp=mac.replace(":","").toLowerCase();\r
-            tmp=tmp.substring(0,tmp.indexOf(","));\r
-            if (runtime.bleInfo.btMacList.contains(tmp)) {\r
-              in_area = true;\r
-              break;\r
+          try {\r
+            for (String mac : btNewScanResult) {\r
+              ICLogger.i("bt mac " + mac.replace(":", "").toLowerCase() + "  " + mac.toLowerCase());\r
+              String tmp = mac.replace(":", "").toLowerCase();\r
+              tmp = tmp.substring(0, tmp.indexOf(","));\r
+              if (runtime.bleInfo.btMacList.contains(tmp)) {\r
+                in_area = true;\r
+                break;\r
+              }\r
             }\r
+            runtime.bleInfo.is_in_area = in_area;\r
+          }catch(Exception e){//如果出错,原来的状态不要变。防止误报,最多延迟一个周期报。\r
+            e.printStackTrace();\r
+            ICLogger.i(e.getMessage());\r
           }\r
-          runtime.bleInfo.is_in_area = in_area;\r
-\r
         } else {\r
           runtime.bleInfo.is_in_area = false;\r
         }\r
index 6f30b4d..5085394 100644 (file)
@@ -1,2 +1,2 @@
-#Thu Sep 24 18:45:56 CST 2020\r
-VERSION_CODE=630\r
+#Thu Sep 24 18:51:22 CST 2020\r
+VERSION_CODE=632\r