-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1003,"versionName":"2111011034","enabled":true,"outputFile":"ICSer_V1003_2111011034_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V1003_2111011034_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1006,"versionName":"2111021448","enabled":true,"outputFile":"ICSer_V1006_2111021448_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V1006_2111021448_release.apk","properties":{}}]
\ No newline at end of file
import com.enqualcomm.support.utils.VibrateUtil;
import com.enqualcomm.support.utils.WakeLockUtil;
import com.enqualcomm.support.utils.mqttConnection;
+
import com.ic.fzd.weather.IFZDWeatherCallback;
import com.ic.fzd.weather.IFZDWeatherService;
import com.ic.jni.ICJniUtils;
-import com.ic.protocolSrv.IFZDCallback;
-import com.ic.protocolSrv.IFZDService;
+
import com.ic.protocols.protocolAPIHelper;
import com.ic.s123.IS123WeatherCallback;
import com.ic.s123.IS123WeatherService;
LocationClient.getInstance().triggerSOSLocationProcess();
//Deliver.sendLocationMSG(protocolAPIHelper.getWarningMSG(runtime));
//开启紧急定位模式,GPS 优先1分钟一次定位,持续5分钟
- runtime.getLocationInstance().setWorkingMod(EMERGNECY_MOD);
+ //runtime.getLocationInstance().setWorkingMod(EMERGNECY_MOD);
setLocationAlarm(runtime.getLocationInstance().getWorkingMod());
//SOS模式,心率测试1分钟一次,持续5分钟
if (needHRSTestOnSOS) {
startNomalLocation = false; //蓝牙定位,直接发GPS坐标
if (!TextUtils.isEmpty(runtime.getWifiInfo())) {
StringMessage AP01_CMD = protocolAPIHelper.getGPSLocationMSG(runtime);
- DeliverMessage(AP01_CMD);
+ Deliver.sendLocationMSG(AP01_CMD);
}
}
}
1, ACTION_CHECK_LOCATION_RESULT);
}
-
private final static int msgWhat_WaitAndSendLocation = 100;
private final static int msgWhat_StartLocationProcess = 0;
private final static int msgWhat_StartBLEProcess = 1;
Handler mhandler;
- boolean wifi_ok = false, gps_ok = false, lbs_ok = false, gps_nosignal = false;
+ boolean wifi_ok = false, gps_ok = false, lbs_ok = false, gps_noSignal = false;
private static boolean needCheckAgain = false;
wifi_ok = false;
gps_ok = false;
lbs_ok = false;
- gps_nosignal = false;
+ gps_noSignal = false;
checktimes++;
int mode = runtime.getLocationInstance().getWorkingMod();
if (runtime.getWifiInfo().length() > 0) wifi_ok = true;
if (runtime.getLocationInstance().getLocationStat() == ICLocation.LOCATION_STAT.LOCATION_FIXED)
gps_ok = true;
if (runtime.getLocationInstance().getLocationStat() == ICLocation.LOCATION_STAT.LOCATION_GPS_TIEMOUT)
- gps_nosignal = true;
+ gps_noSignal = true;
ICLogger.d("runtime.getLocationInstance().isDataChanged() ==> " + runtime.getLocationInstance().isDataChanged());
ICLogger.d("runtime.getLocationInstance() ==> " + runtime.getLocationInstance());
lbs_ok = (runtime.getLocationInstance().isDataChanged() == false
ICLogger.i("waitAndSendLocation " + checktimes + " timeout");
timeout = true;
}
- if (mNoMoveTimeout && (timeout || gps_nosignal)) {
+ if (mNoMoveTimeout && (timeout || gps_noSignal)) {
//没有移动,GPS超时或者没信号都会给 计数 加 1
gpsTimeoutCountOnNoMove++;
}
ICLogger.i("waitAndSendLocation " + timeCost + "> 50000ms timeout");
//timeout=true;
}
-
+ ICLogger.d("lbs_ok ==> " + lbs_ok);
+ ICLogger.d("gps_ok ==> " + gps_ok);
+ ICLogger.d("wifi_ok ==> " + wifi_ok);
+ ICLogger.d("timeout ==> " + timeout);
+ ICLogger.d("gps_noSignal ==> " + gps_noSignal);
+ ICLogger.d("startSOSLocation ==> " + startSOSLocation);
// lbs only +timeout, lbs+wifi+gpsNosignal, libs+ , lbs+gps+wifi, Timeout can override wifi and gps
if ((lbs_ok && timeout)
|| (gps_ok)
|| (lbs_ok && (gps_ok || startSOSLocation))
|| (lbs_ok && (gps_ok || startSOSLocation) && wifi_ok)
- || (lbs_ok && gps_nosignal && wifi_ok)
+ || (lbs_ok && gps_noSignal && wifi_ok)
) {
String locationtype = "LBS";
if (gps_ok) {
if (gps_ok) {
if (!TextUtils.isEmpty(runtime.getWifiInfo())) {
StringMessage AP01_CMD = protocolAPIHelper.getGPSLocationMSG(runtime);
- DeliverMessage(AP01_CMD);
+ Deliver.sendLocationMSG(AP01_CMD);
}
} else {
StringMessage AP02_CMD = protocolAPIHelper.getLBSLocationMSG(runtime);
- DeliverMessage(AP02_CMD);
+ Deliver.sendLocationMSG(AP02_CMD);
}
}
stopCheckLocationResult();
if (startNomalLocation = true) {
startNomalLocation = false;
StringMessage AP02_CMD = protocolAPIHelper.getLBSLocationMSG(runtime);
- DeliverMessage(AP02_CMD);
+ Deliver.sendLocationMSG(AP02_CMD);
}
stopCheckLocationResult();
if (message.what == MSG_WHAT_GPS_TIMEOUT || message.what == MSG_WHAT_GPS_NOSTAR) {
//no start
//do nothing
-
} else if (message.what == MSG_WHAT_GPS_FIXED) {
//fixed
/*
延迟三秒后才设置runtime的定位标志,以便稳定坐标值。
*/
runtime.getLocationInstance().setLocationStat(ICLocation.LOCATION_STAT.LOCATION_FIXED);
-
}
-
if (!noStop) {
ICLogger.i("handleMessage MSG_WHAT_GPS_TIMEOUT/ MSG_WHAT_GPS_NOSTAR/ MSG_WHAT_GPS_FIXED " + message.what);
private String MNC = "0";\r
private int LAC = 0;\r
private int CID = 0;\r
- private int rxlevel = 0;\r
- private boolean datachanged = false;\r
+ private int rxLevel = 0;\r
+ private boolean dataChanged = false;\r
\r
private String lastMCC = "0";\r
private String lastMNC = "0";\r
lastMNC = MNC;\r
lastLAC = LAC;\r
lastCID = CID;\r
- datachanged = false;\r
}\r
\r
public void setMCC(String mcc) {\r
if (!mcc.equals(lastMCC)) {\r
MCC = mcc;\r
- datachanged = true;\r
+ dataChanged = true;\r
}\r
}\r
\r
if (!mnc.equals(lastMNC)) {\r
ICLogger.d("MNC==> " + mnc);\r
MNC = mnc;\r
- datachanged = true;\r
+ dataChanged = true;\r
}\r
}\r
\r
if (lac != lastLAC) {\r
ICLogger.d("LAC==> " + lac);\r
LAC = lac;\r
- datachanged = true;\r
+ dataChanged = true;\r
}\r
}\r
\r
public void setCID(int cid) {\r
if (cid != lastCID) {\r
CID = cid;\r
- datachanged = true;\r
+ dataChanged = true;\r
}\r
}\r
\r
- public void setRxlevel(int level) {\r
- rxlevel = level;\r
+ public void setRxLevel(int level) {\r
+ rxLevel = level;\r
}\r
\r
public boolean isDataChanged() {\r
- return datachanged;\r
+ return dataChanged;\r
}\r
\r
public String getMCC() {\r
return MNC;\r
}\r
\r
- public int getRxlevel() {\r
- return rxlevel;\r
+ public int getRxLevel() {\r
+ return rxLevel;\r
}\r
\r
public long getLAC() {\r
", MNC='" + MNC + '\'' +\r
", LAC=" + LAC +\r
", CID=" + CID +\r
- ", rxlevel=" + rxlevel +\r
- ", datachanged=" + datachanged +\r
+ ", rxlevel=" + rxLevel +\r
+ ", datachanged=" + dataChanged +\r
", lastMCC='" + lastMCC + '\'' +\r
", lastMNC='" + lastMNC + '\'' +\r
", lastLAC=" + lastLAC +\r
* 4手表运行静止状态 00000000000000000000000000010000 0x00000010
* 16SOS 报警 00000000000000010000000000000000 0x00010000
* 17低电报警 00000000000000100000000000000000 0x00020000
- * 18出围栏报警(逃跑出蓝牙监控范围) 00000000000001000000000000000000 0x00040000
+ * 18出围栏报警(逃跑出蓝牙监控范围) 00000000000001000000000000000000 0x00040000
* 19进围栏报警(目前没用到) 00000000000010000000000000000000 0x00080000
* 20手环拆除报警 (表带剪断) 00000000000100000000000000000000 0x00100000
* 21跌倒报警 00000000001000000000000000000000 0x00200000
return hex;
}
-
private String getSettingsValue(String key) {
Cursor query = contextProxy.getResolver().query(Uri.parse(ICGlobalSettingsProvider.SETTINGS),
new String[]{ICDatabaseHelper.sValue},
return null;
}
-
//TODO:要判断是否开启低电量报警
public void updateFZDDevStatusLowbat(boolean lowbattery) {
//TODO:
.append(String.format("%1$03d", mnc))
.append(String.format("%1$04X", gpsp.getLAC()))
.append(String.format("%1$07X", gpsp.getGSMStationCID()))
- .append(String.format("%1$02X", gpsp.getRxlevel()));
+ .append(String.format("%1$02X", gpsp.getRxLevel()));
return sb.toString();
}
import android.content.Context;
import android.os.Build;
-import android.os.Handler;
-import android.os.Message;
-import android.os.PowerManager;
-import android.provider.ContactsContract;
import android.telephony.CellInfo;
import android.telephony.CellInfoCdma;
import android.telephony.CellInfoGsm;
import android.telephony.cdma.CdmaCellLocation;
import android.telephony.gsm.GsmCellLocation;
-import com.android.internal.telephony.CallManager;
-import com.android.internal.telephony.CallStateException;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneFactory;
import com.enqualcomm.support.Config;
-import com.enqualcomm.support.GSensorListener;
-import com.enqualcomm.support.adapter.LBSHelper;
import com.enqualcomm.support.bean.Runtime;
import com.sprd.internal.telephony.SprdCallManager;
-import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
runtime.setCellinfo(gsmSb.toString());
runtime.getLocationInstance().setCID(gsmCell.getCid());
runtime.getLocationInstance().setLAC(gsmCell.getLac());
- runtime.getLocationInstance().setRxlevel(150 - Math.abs(getSignal(telephonyManager, runtime)));
+ runtime.getLocationInstance().setRxLevel(150 - Math.abs(getSignal(telephonyManager, runtime)));
ICLogger.i("LBS GsmCellLocation " + gsmSb.toString());
if (Config.LOG_TOFILE) ICLogger.logToFile("LBS", gsmSb.toString());
}
public boolean sendMsg(String cmd) {
-
if (cmd == null || cmd.isEmpty()) {
return false;
}
-
if (!isServerConnected()) {
-
log("skiped" + cmd);
if (Config.LOG_TOFILE) ICLogger.logToFile("APILog", " skiped " + cmd);
return false;
\r
@Override\r
public void send(StringMessage paramStringMessage) {\r
-\r
if (paramStringMessage == null) {\r
ICLogger.i("mqtt send StringMessage Null skip!");\r
return;\r
-#Mon Nov 01 10:34:52 CST 2021\r
-VERSION_CODE=1003\r
+#Tue Nov 02 14:48:11 CST 2021\r
+VERSION_CODE=1006\r