release protocolV2 V901
authorSnickerSun <scy@incartech.cn>
Thu, 2 Sep 2021 01:30:21 +0000 (09:30 +0800)
committerSnickerSun <scy@incartech.cn>
Thu, 2 Sep 2021 01:30:21 +0000 (09:30 +0800)
修改协议主窗口显示内容,尽量在不能移动窗口内容的前提下展示更多的重要信息。
调试状态时,出现异常计步要弹窗提示。
默认l004 关闭 心率和体温,需要下指令开启。

app/release/ICSer_V901_2109020927_release.apk [moved from app/release/ICSer_V897_2108262136_release.apk with 77% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/Config.java
app/src/main/java/com/enqualcomm/support/GSensorListener.java
app/src/main/java/com/enqualcomm/support/utils/DeviceInfoUtil.java
app/src/main/java/com/enqualcomm/support/utils/ProcessReceiver.java
app/version_code.properties

similarity index 77%
rename from app/release/ICSer_V897_2108262136_release.apk
rename to app/release/ICSer_V901_2109020927_release.apk
index 2cbb710..b57d79e 100644 (file)
Binary files a/app/release/ICSer_V897_2108262136_release.apk and b/app/release/ICSer_V901_2109020927_release.apk differ
index 5da0ef2..c9c56b1 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":897,"versionName":"2108262136","enabled":true,"outputFile":"ICSer_V897_2108262136_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V897_2108262136_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":901,"versionName":"2109020927","enabled":true,"outputFile":"ICSer_V901_2109020927_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V901_2109020927_release.apk","properties":{}}]
\ No newline at end of file
index 9d5e059..cea571d 100644 (file)
@@ -911,8 +911,8 @@ public class Config {
             ConfigAlarm(Runtime.AlarmType.ALARM_LOCK_WATCH, true);
             DefaultLocationMode = CUSTOM_MOD8_GPS;
             DefaultLocationCycle = 10 * 60;
-            DefaultPPGTestCycleInMinutes = 60;
-            DefaultTemperatureTestCycle = 60 * 60;
+            DefaultPPGTestCycleInMinutes = 0;
+            DefaultTemperatureTestCycle = 0 * 60;
             noPushTxtNotifyDialog = true;
             noSMSNotifyDialog = true;
             noVoiceNotifyDialog = true;
index a669229..489cf05 100644 (file)
@@ -4,6 +4,9 @@ package com.enqualcomm.support;
 import android.os.Handler;
 import android.os.Message;
 
+import com.enqualcomm.support.utils.ProcessReceiver;
+import com.enqualcomm.support.utils.Util;
+import com.enqualcomm.support.utils.VibrateUtil;
 import com.ic.jni.ICJniUtils;
 import com.enqualcomm.support.bean.Runtime;
 
@@ -31,11 +34,20 @@ public class GSensorListener  {
       if(getStepCountOver==false) {
         getStepCountOver = true;
         CURRENT_STEP = ICJniUtils.getStepCount();
-        StringBuilder stringBuilder1 = new StringBuilder();
-        stringBuilder1.append("CURRENT_STEP =");
-        stringBuilder1.append(CURRENT_STEP);
-        ICLogger.i(stringBuilder1.toString());
-        runtime.setTotalStepCount(CURRENT_STEP);
+        StringBuilder log = new StringBuilder();
+        log.append("CURRENT_STEP =");
+        log.append(CURRENT_STEP);
+        ICLogger.i(log.toString());
+
+        if(CURRENT_STEP<0 && Util.getSystemProperties("persist.sys.debugprotocol","false").equalsIgnoreCase("true")){
+          ProcessReceiver processReceiver=ProcessReceiver.getInstance();
+          log.append("steCount <0 , bad number! skip it !");
+          if (processReceiver != null) {
+                processReceiver.showWarningText(runtime.getContextProxy().context,log.toString());
+          }
+        }else {
+          runtime.setTotalStepCount(CURRENT_STEP);
+        }
         getStepCountOver = false;
       }
   }
index ec0a604..5915d11 100644 (file)
@@ -248,23 +248,23 @@ public class DeviceInfoUtil {
                 .append(sim.getNetworkType() == SimSignalUtil.IS_2G ? "2G" : (sim.getNetworkType() == SimSignalUtil.IS_3G) ? "3G" : (sim.getNetworkType() == SimSignalUtil.IS_4G ? "4G" : "unknown"))
                 .append(" [").append(runtime.getSignalStrength()).append(",").append(runtime.getSignalInfo()).append("] ")
                 .append(runtime.IMEI())
-                .append("\n Srv [P").append(Config.protocol_no).append(" ").append(runtime.getHost()).append(":").append(runtime.getPort()).append("]").append(KeepAlive.isConnected).append(" , HBcycle ").append(runtime.getHeartBeatCycle())
-                .append("\n ServerConnected is ").append(runtime.isServerProtocolConnected())
+                .append("\nSrv [P").append(Config.protocol_no).append(" ").append(runtime.getHost()).append(":").append(runtime.getPort()).append("]").append(KeepAlive.isConnected).append(" , HBcycle ").append(runtime.getHeartBeatCycle())
+                .append("\nServerConnected is ").append(runtime.isServerProtocolConnected())
 //            .append(",Temp ").append(String.format("%1$.2f",wrist_temp)).append(",Body ").append(String.format("%1$.2f",TemperatureUtil.getBodyTemp(wrist_temp,26.0f)))
                 .append(",BTIn ").append(runtime.bleInfo.is_in_area)
-                .append(" \n Bat ").append(runtime.getBattery()).append(",").append(runtime.getBatteryVotage())
-                .append(" charged ").append(runtime.isPowerConnected())
-                .append(" StepCount ").append(runtime.getTotalStepCount())
-                .append("\n Working Mode ").append(runtime.getLocationInstance().getWorkingMod())
-                .append(" \n Location Cycle ").append(runtime.getLocationInstance().getLocation_cycle()).append("s")
-                .append(" \n LocationType ").append(runtime.getLocationInstance().getLocationType())
-                .append(" at ").append(runtime.getLocationInstance().getLocationTime())
-                .append(" \n PPGTestCycle ").append(runtime.getPpgTestCycleInMinutes()).append("m")
-                .append("\n LastPPG ").append(runtime.getHRS().getPPG())
+                .append(" \nBat ").append(runtime.getBattery()).append(",").append(runtime.getBatteryVotage())
+                .append(" Step ").append(runtime.getTotalStepCount())
+                .append(runtime.isPowerConnected()?" Charging":" NoCharge")
+                .append("\nWorkingMode ").append(runtime.getLocationInstance().getWorkingMod())
+                .append(" \nLocationCycle ").append(runtime.getLocationInstance().getLocation_cycle()).append("s")
+                .append(" \nLocationType ").append(runtime.getLocationInstance().getLocationType())
+                .append(" at ").append((runtime.getLocationInstance().getLocationTime() !=null &&runtime.getLocationInstance().getLocationTime().length()>2 )?runtime.getLocationInstance().getLocationTime().substring(2):"0")
+                .append(" \nPPGTestCycle ").append(runtime.getPpgTestCycleInMinutes()).append("m")
+                .append("\nLastPPG ").append(runtime.getHRS().getPPG())
                 .append(",bph ").append(runtime.getHRS().getBPH())
                 .append(",bpl ").append(runtime.getHRS().getBPL())
-                .append(" at ").append(runtime.getHRS().getTestTime())
-                .append(" \n TempTestCycle ").append(runtime.temp_test_Cycle_Seconds).append("s")
+                .append(" at ").append((runtime.getHRS().getTestTime()!=null && runtime.getHRS().getTestTime().length()>2)?runtime.getHRS().getTestTime().substring(2):"0")
+                .append(" \nTempTestCycle ").append(runtime.temp_test_Cycle_Seconds).append("s")
                 .append("\nrealimei:").append(PhoneUtils.getIMEI(runtime.getContextProxy().context))
                 .append("\n").append(runtime.getLBSMultiStationData())
                 .append("\nWiFi Status ").append(Util.isWifiIsOpen(runtime.getContextProxy().context, runtime))
index 02bfb5d..8c4afad 100644 (file)
@@ -68,14 +68,21 @@ public class ProcessReceiver extends BroadcastReceiver {
 
     private float y2 = 0.0F;
 
+    private  static ProcessReceiver processReceiver=null;
     public ProcessReceiver() {
         if (mHandler == null) {
             HandlerThread handlerThread = new HandlerThread("ic:process-receiver-handler-thread");
             handlerThread.start();
             mHandler = new Handler(handlerThread.getLooper());
         }
+        if (processReceiver == null){
+            processReceiver = this;
+        }
     }
 
+    public static ProcessReceiver getInstance(){
+        return processReceiver;
+    }
     private static Handler mHandler = null;
 
 
@@ -528,4 +535,11 @@ public class ProcessReceiver extends BroadcastReceiver {
     }
 
 
+    public void showWarningText(Context context,String txt){
+        initMyDialog(context, null, 5, txt, false);
+        playFindDevVoice(context);
+        VibrateUtil.getInstance(context).vibrateOn(true);
+        screenOn(context);
+    }
+
 }
index e7588a1..168700e 100644 (file)
@@ -1,2 +1,2 @@
-#Thu Aug 26 21:36:16 CST 2021\r
-VERSION_CODE=897\r
+#Thu Sep 02 09:27:35 CST 2021\r
+VERSION_CODE=901\r