要求直接发送SOS信息,不做缓存。
通过 persist.sys.sos_at_once 控制
public static final int GPSLocationTimeoutInSeconds=50;
public static final int WiFiLocationTimeoutInSeconds=12;
+ public static final boolean sendSOSAtOnce=Util.getSystemProperties("persist.sys.sos_at_once","false").equals("true");
public static String c43_branch_name="none";
public static String custom_name="none";
btHelper.scanBLE();
}
} else {
- Util.mSleep(1000);
+ // Util.mSleep(1000);
StringMessage waningmsg = protocolAPIHelper.getWarningMSG(runtime);
- DeliverMessage(waningmsg);
+ if(Config.sendSOSAtOnce){
+ //客户ZSH因网络较差,经常缓存过多消息造成无法及时发送
+ //要求直接发送SOS信息,不做缓存。
+ connection.send(waningmsg);
+ }else {
+ DeliverMessage(waningmsg);
+ }
}
}