-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":643,"versionName":"2010121745","enabled":true,"outputFile":"ICSer_V643_2010121745_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V643_2010121745_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":645,"versionName":"2010131213","enabled":true,"outputFile":"ICSer_V645_2010131213_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V645_2010131213_release.apk","properties":{}}]
\ No newline at end of file
}\r
runtime.setAlarmType(Runtime.AlarmType.ALARM_SOS);\r
//trigger AP10 报警定位\r
-// CoreService.this.locationClient.triggerSOSLocationProcess();\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
\r
//开启紧急定位模式,GPS 优先1分钟一次定位,持续5分钟\r
runtime.getLocationInstance().setWorkingMod(EMERGNECY_MOD);\r
\r
if(Config.isAlarmTypeEnabled(Runtime.AlarmType.ALARM_SEDENTARY)){\r
runtime.setAlarmType(Runtime.AlarmType.ALARM_SEDENTARY);\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ locationClient.triggerSOSLocationProcess();\r
}\r
}else{\r
//只要 平均每分钟活动数大于参考值,则重置 lastCheckSitTime 以及 lastSitCheckStepCount\r
if ( runtime.bleInfo.last_is_in_area==true) {\r
//只有上一次在区域内,这次出区域才需要报警\r
ICLogger.i("BT 不在区域内,且上次在区域内,报警!");\r
- StringMessage AL_CMD = protocolAPIHelper.getWarningMSG(runtime);\r
- DeliverMessage(AL_CMD);\r
+ //如果需要报警定位,则强制进行sos定位,不能通过triggerSOS,因为函数中调用了BLEScan会造成循环调用\r
+ startSOSLocation=true;//启动SOS定位,为了快速响应,只要wifi定位即可。\r
+ forceLocation=1;\r
+ startLocationProcess(ICLocation.NORMAL_MOD);\r
+// StringMessage AL_CMD = protocolAPIHelper.getWarningMSG(runtime);\r
+// DeliverMessage(AL_CMD);\r
}\r
}else{\r
ICLogger.i("BT 在区域内!");\r
if ( runtime.bleInfo.last_is_in_area==true) {\r
//只有上一次在区域内,这次出区域才需要报警\r
ICLogger.i("BT 不在区域内,且上次在区域内,报警!");\r
- StringMessage AL_CMD = protocolAPIHelper.getWarningMSG(runtime);\r
- DeliverMessage(AL_CMD);\r
+// StringMessage AL_CMD = protocolAPIHelper.getWarningMSG(runtime);\r
+// DeliverMessage(AL_CMD);\r
+ //如果需要报警定位,则强制进行sos定位,不能通过triggerSOS,因为函数中调用了BLEScan会造成循环调用\r
+ startSOSLocation=true;//启动SOS定位,为了快速响应,只要wifi定位即可。\r
+ forceLocation=1;\r
+ startLocationProcess(ICLocation.NORMAL_MOD);\r
+ }else {\r
+ if(startSOSLocation){\r
+ startLocationProcess(ICLocation.NORMAL_MOD);\r
+ }else {\r
+ startLocationProcess(runtime.getLocationInstance().getWorkingMod());\r
+ }\r
}\r
- startLocationProcess(runtime.getLocationInstance().getWorkingMod());\r
} else {\r
ICLogger.i("BT 在区域内,直接发送区域坐标即可!");\r
runtime.updateFZDDevStatusEscape(false);\r
- StringMessage AP01_CMD = protocolAPIHelper.getGPSLocationMSG(runtime);\r
- DeliverMessage(AP01_CMD);\r
+ if(startSOSLocation) {\r
+ StringMessage AP01_CMD = protocolAPIHelper.getWarningMSG(runtime);\r
+ DeliverMessage(AP01_CMD);\r
+ startSOSLocation=false;\r
+ }else {\r
+ StringMessage AP01_CMD = protocolAPIHelper.getGPSLocationMSG(runtime);\r
+ DeliverMessage(AP01_CMD);\r
+ }\r
}\r
}\r
\r
}else if (msg.what == msgWhat_StartSOSLocationProcess){\r
startSOSLocation=true;//启动SOS定位,为了快速响应,只要wifi定位即可。\r
forceLocation=1;\r
- startLocationProcess(ICLocation.NORMAL_MOD);\r
+ if (runtime.bleInfo.btMacList.size() > 0) {\r
+ //有蓝牙搜索要求则 先进行蓝牙扫描\r
+ if (needLocationForBT())\r
+ btHelper.scanBLE();\r
+ } else {\r
+ startLocationProcess(ICLocation.NORMAL_MOD);\r
+ }\r
}\r
}\r
};\r
if (runtime.getBatteryLow()) {\r
runtime.setAlarmType(Runtime.AlarmType.ALARM_LOWBATTERY);\r
//trigger AP10 报警低电\r
- connection.send(protocolAPIHelper.getWarningMSG(runtime));\r
+// connection.send(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
}\r
\r
this.batteryLowNotification = true;\r
\r
import com.enqualcomm.support.Config;\r
import com.enqualcomm.support.CoreService;\r
+import com.enqualcomm.support.LocationClient;\r
import com.enqualcomm.support.R;\r
import com.enqualcomm.support.bean.Runtime;\r
import com.enqualcomm.support.bean.StringMessage;\r
}\r
mRuntime.Cut_off_flag = 0;\r
if(mRuntime.setAlarmType(Runtime.AlarmType.ALARM_LOCK_WATCH)) {\r
- StringMessage msg = protocolAPIHelper.getWarningMSG(mRuntime);\r
- Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
+// StringMessage msg = protocolAPIHelper.getWarningMSG(mRuntime);\r
+// Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
}\r
\r
// try {\r
}\r
mRuntime.Cut_off_flag=1;\r
if(mRuntime.setAlarmType(Runtime.AlarmType.ALARM_CUTOFF)) {\r
- StringMessage msg = protocolAPIHelper.getWarningMSG(mRuntime);\r
- Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// StringMessage msg = protocolAPIHelper.getWarningMSG(mRuntime);\r
+// Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
}\r
// try {\r
// sleep(1000);\r
}\r
mRuntime.Anti_off_flag = 0;\r
if(mRuntime.setAlarmType(Runtime.AlarmType.ALARM_WEARED)) {\r
- StringMessage msg = protocolAPIHelper.getWarningMSG(mRuntime);\r
- Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// StringMessage msg = protocolAPIHelper.getWarningMSG(mRuntime);\r
+// Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
}\r
// try {\r
// sleep(1000);\r
}\r
mRuntime.Anti_off_flag=1;\r
if(mRuntime.setAlarmType(Runtime.AlarmType.ALARM_ANTIOFF)) {\r
- StringMessage msg = protocolAPIHelper.getWarningMSG(mRuntime);\r
- Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// StringMessage msg = protocolAPIHelper.getWarningMSG(mRuntime);\r
+// Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
}\r
// try {\r
// sleep(1000);\r
import com.enqualcomm.support.Config;\r
import com.enqualcomm.support.Constants;\r
import com.enqualcomm.support.CoreService;\r
+import com.enqualcomm.support.LocationClient;\r
import com.enqualcomm.support.bean.StringMessage;\r
import com.enqualcomm.support.utils.ICHttpUtil;\r
import com.enqualcomm.support.utils.Util;\r
\r
if(runtime.setAlarmType(Runtime.AlarmType.ALARM_HEART_RATE_HIGH)) {\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
}\r
\r
}else if ( runtime.getHRS().ppg_threshold_min>0 && runtime.getHRS().getPPG()<runtime.getHRS().ppg_threshold_min) {\r
if( runtime.setAlarmType(Runtime.AlarmType.ALARM_HEART_RATE_LOW)) {\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
}\r
}\r
\r
\r
if(runtime.setAlarmType(Runtime.AlarmType.ALARM_BPH_HIGH)) {\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
}\r
\r
}else if ( runtime.getHRS().bph_threshold_min>0 && runtime.getHRS().getBPH()<runtime.getHRS().bph_threshold_min) {\r
if(runtime.setAlarmType(Runtime.AlarmType.ALARM_BPH_LOW)) {\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
}\r
}\r
\r
\r
if(runtime.setAlarmType(Runtime.AlarmType.ALARM_BPL_HIGH)) {\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
}\r
\r
}else if ( runtime.getHRS().bpl_threshold_min>0 && runtime.getHRS().getBPL()<runtime.getHRS().bpl_threshold_min) {\r
if(runtime.setAlarmType(Runtime.AlarmType.ALARM_BPL_LOW)) {\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
}\r
\r
}\r
// if (KeepAlive.this.mRuntime.getBatteryLow()){\r
// KeepAlive.this.mRuntime.setAlarmType(Runtime.AlarmType.ALARM_LOWBATTERY);\r
KeepAlive.this.mRuntime.setAlarmType(Runtime.AlarmType.ALARM_POWER_OFF);\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(KeepAlive.this.mRuntime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(KeepAlive.this.mRuntime));\r
\r
ICLogger.i("Shutdown Received! send AP10 !");\r
// }\r
\r
import com.enqualcomm.support.Config;\r
import com.enqualcomm.support.CoreService;\r
+import com.enqualcomm.support.LocationClient;\r
import com.enqualcomm.support.service.AntiMonitorService;\r
import com.enqualcomm.support.service.AudioService;\r
import com.enqualcomm.support.service.Deliver;\r
play_waning_notify(context);\r
runtime.setAlarmType(Runtime.AlarmType.ALARM_LOWBATTERY);\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
}else if (runtime.isPowerConnected()==false && runtime.getBatterylevel()< 5 ) {\r
//没有充电,上次电池level > 15% , 上次电池并且不是 电池低电状态,则报警\r
Intent intent=new Intent();\r
play_waning_notify(context);\r
runtime.setAlarmType(Runtime.AlarmType.ALARM_LOWBATTERY);\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG( protocolAPIHelper.getWarningMSG(runtime));\r
+// Deliver.sendLocationMSG( protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
}\r
}\r
private void send_batterylow_event_broadcast(Context context,int batlow){\r
import com.enqualcomm.support.Config;\r
import com.enqualcomm.support.Constants;\r
import com.enqualcomm.support.CoreService;\r
+import com.enqualcomm.support.LocationClient;\r
import com.enqualcomm.support.bean.Runtime;\r
import com.enqualcomm.support.bean.StringMessage;\r
import com.enqualcomm.support.bean.heartRateStatus;\r
case 1:\r
if(runtime.setAlarmType(Runtime.AlarmType.ALARM_TEMP_HIGH)) {\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
}\r
break;\r
case 2:\r
if(runtime.setAlarmType(Runtime.AlarmType.ALARM_TEMP_LOW)) {\r
//trigger AP10 报警定位\r
- Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
+ LocationClient.getInstance().triggerSOSLocationProcess();\r
+// Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));\r
}\r
break;\r
}\r
-#Mon Oct 12 17:45:39 CST 2020\r
-VERSION_CODE=643\r
+#Tue Oct 13 12:13:36 CST 2020\r
+VERSION_CODE=645\r