release ProtocolV2 V888
authorSnickerSun <scy@incartech.cn>
Wed, 7 Jul 2021 01:56:38 +0000 (09:56 +0800)
committerSnickerSun <scy@incartech.cn>
Wed, 7 Jul 2021 01:56:38 +0000 (09:56 +0800)
修正APN调用方式,目前默认L004,L005 使用 Tele2 IoT ,这个只能是临时方案,后面改为可配置。

app/release/ICSer_V888_2107070948_release.apk [moved from app/release/ICSer_V885_2107052142_release.apk with 77% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/CoreService.java
app/src/main/java/com/enqualcomm/support/utils/APNUtil.java
app/src/main/java/com/enqualcomm/support/utils/ApnEditor.java
app/version_code.properties

similarity index 77%
rename from app/release/ICSer_V885_2107052142_release.apk
rename to app/release/ICSer_V888_2107070948_release.apk
index c265c84..d7e1499 100644 (file)
Binary files a/app/release/ICSer_V885_2107052142_release.apk and b/app/release/ICSer_V888_2107070948_release.apk differ
index ff56551..95b0cf6 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":885,"versionName":"2107052142","enabled":true,"outputFile":"ICSer_V885_2107052142_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V885_2107052142_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":888,"versionName":"2107070948","enabled":true,"outputFile":"ICSer_V888_2107070948_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V888_2107070948_release.apk","properties":{}}]
\ No newline at end of file
index 12ddff7..ac21cc9 100644 (file)
@@ -44,6 +44,7 @@ import com.enqualcomm.support.service.SilentManager;
 import com.enqualcomm.support.service.WeTalkMsgObserver;
 import com.enqualcomm.support.service.base.AbstractConnectionService;
 import com.enqualcomm.support.service.base.AbstractInvokeHandlerService;
+import com.enqualcomm.support.utils.APNUtil;
 import com.enqualcomm.support.utils.AlarmHelper;
 import com.enqualcomm.support.utils.AlarmWakeUp;
 import com.enqualcomm.support.utils.BatteryUtil;
@@ -899,6 +900,19 @@ public class CoreService extends Service {
 
         //重置缓存中的在等待命令
         Deliver.resetCMDReocrdsDB();
+
+
+        if(Config.custom_name.equals("l004pt")||Config.custom_name.equals("l004")||Config.custom_name.equals("l005"))
+        {
+            mHandler.postDelayed(new Runnable() {
+                @Override
+                public void run() {
+                    //L004PT ,L005 默认开启roaming以及默认使用以下apn
+                    APNUtil.selectAPN("240","07","NXT17.NET",CoreService.getInstance());
+                }
+            },5000);
+
+        }
         ReConnectToServer();
     }
 
index 2ed39a4..35efdc7 100644 (file)
@@ -82,9 +82,7 @@ public class APNUtil {
      * @return
      */
     public static boolean selectAPN(String mcc,String mnc,String apn,Context context) {
-        ApnEditor apnEditor=new ApnEditor(context);
-        apnEditor.setDefaultAPN(apn,mcc+mnc);
-
+        ApnEditor.getApnEditorInstance(context).setDefaultAPN(apn,mcc+mnc);
         return true;
     }
     public static boolean checkAPN(String mcc,String mnc,String apn,Context context) {
index 1db6ff0..bedd829 100644 (file)
@@ -267,13 +267,12 @@ public class ApnEditor {
     }
     public void setDefaultAPN(String apn, String mccmnc){
         String apnid=queryApnID(apn,mccmnc);
-        String currentapnid=apnEditor.getSelectedApnKey();
+        String currentapnid=getSelectedApnKey();
         ICLogger.d("current APN key "+apnid +" selected APN key " + currentapnid);
         setSelectedApnKey(apnid);
-        currentapnid=apnEditor.getSelectedApnKey();
+        currentapnid=getSelectedApnKey();
         ICLogger.d("after set APN key "+apnid +" selected APN key " + currentapnid);
 
-
     }
     public String queryApnID(String apn,String mccmnc) {
 
index fa76615..dd2bb55 100644 (file)
@@ -1,2 +1,2 @@
-#Mon Jul 05 21:42:01 CST 2021\r
-VERSION_CODE=885\r
+#Wed Jul 07 09:48:55 CST 2021\r
+VERSION_CODE=888\r