From: SnickerSun Date: Thu, 2 Sep 2021 01:30:21 +0000 (+0800) Subject: release protocolV2 V901 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=4693705d3f61b72dc7fb0f8eb03361641ca90c57;p=icsupport.git release protocolV2 V901 修改协议主窗口显示内容,尽量在不能移动窗口内容的前提下展示更多的重要信息。 调试状态时,出现异常计步要弹窗提示。 默认l004 关闭 心率和体温,需要下指令开启。 --- diff --git a/app/release/ICSer_V897_2108262136_release.apk b/app/release/ICSer_V901_2109020927_release.apk similarity index 77% rename from app/release/ICSer_V897_2108262136_release.apk rename to app/release/ICSer_V901_2109020927_release.apk index 2cbb7105..b57d79ef 100644 Binary files a/app/release/ICSer_V897_2108262136_release.apk and b/app/release/ICSer_V901_2109020927_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index 5da0ef2e..c9c56b17 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -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 diff --git a/app/src/main/java/com/enqualcomm/support/Config.java b/app/src/main/java/com/enqualcomm/support/Config.java index 9d5e0591..cea571d5 100644 --- a/app/src/main/java/com/enqualcomm/support/Config.java +++ b/app/src/main/java/com/enqualcomm/support/Config.java @@ -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; diff --git a/app/src/main/java/com/enqualcomm/support/GSensorListener.java b/app/src/main/java/com/enqualcomm/support/GSensorListener.java index a6692294..489cf05b 100644 --- a/app/src/main/java/com/enqualcomm/support/GSensorListener.java +++ b/app/src/main/java/com/enqualcomm/support/GSensorListener.java @@ -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; } } diff --git a/app/src/main/java/com/enqualcomm/support/utils/DeviceInfoUtil.java b/app/src/main/java/com/enqualcomm/support/utils/DeviceInfoUtil.java index ec0a6044..5915d116 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/DeviceInfoUtil.java +++ b/app/src/main/java/com/enqualcomm/support/utils/DeviceInfoUtil.java @@ -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)) diff --git a/app/src/main/java/com/enqualcomm/support/utils/ProcessReceiver.java b/app/src/main/java/com/enqualcomm/support/utils/ProcessReceiver.java index 02bfb5d1..8c4afad9 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/ProcessReceiver.java +++ b/app/src/main/java/com/enqualcomm/support/utils/ProcessReceiver.java @@ -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); + } + } diff --git a/app/version_code.properties b/app/version_code.properties index e7588a14..168700e8 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Thu Aug 26 21:36:16 CST 2021 -VERSION_CODE=897 +#Thu Sep 02 09:27:35 CST 2021 +VERSION_CODE=901