diff --git a/app/build.gradle b/app/build.gradle index f0bb2f4..72a1e2d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,8 +18,8 @@ android { minSdkVersion 26 targetSdkVersion 29 - versionCode 1 - versionName "1.0" + versionCode 5 + versionName "1.1.3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -70,6 +70,15 @@ android { v2SigningEnabled false } + iPlay50SE { + storeFile file("keystore/iPlay50SE.keystore") + storePassword "123456" + keyAlias "iplay50se" + keyPassword "123456" + v1SigningEnabled true + v2SigningEnabled true + } + zhanRui { storeFile file("keystore/zhanxun.keystore") storePassword "123456" @@ -109,6 +118,20 @@ android { signingConfig signingConfigs.teclast8183 } + iPlay50SEDebug.initWith(debug) + iPlay50SEDebug { + buildConfigField "String", "platform", '"ipaly50SE"' + versionNameSuffix "-debug" + debuggable true + signingConfig signingConfigs.iPlay50SE + } + + iPlay50SERelease.initWith(release) + iPlay50SERelease { + buildConfigField "String", "platform", '"ipaly50SE"' + signingConfig signingConfigs.iPlay50SE + } + zhanRuiDebug.initWith(debug) zhanRuiDebug { debuggable true diff --git a/app/keystore/iPlay50SE.keystore b/app/keystore/iPlay50SE.keystore new file mode 100644 index 0000000..57f2521 Binary files /dev/null and b/app/keystore/iPlay50SE.keystore differ diff --git a/app/src/main/java/com/uiui/zyappstore/network/NetInterfaceManager.java b/app/src/main/java/com/uiui/zyappstore/network/NetInterfaceManager.java index 8307e5d..953c2b6 100644 --- a/app/src/main/java/com/uiui/zyappstore/network/NetInterfaceManager.java +++ b/app/src/main/java/com/uiui/zyappstore/network/NetInterfaceManager.java @@ -212,6 +212,8 @@ public class NetInterfaceManager { set.add(JGYUtils.Cube8183Tag); }else if (platform == JGYUtils.Teclast8183Platform) { set.add(JGYUtils.TeclastMTK12Tag); + }else if (platform == JGYUtils.ipaly50SEPlatform) { + set.add(JGYUtils.ipaly50SETag); } }); setpushTag(set); diff --git a/app/src/main/java/com/uiui/zyappstore/utils/JGYUtils.java b/app/src/main/java/com/uiui/zyappstore/utils/JGYUtils.java index bb56fda..acc8fa8 100644 --- a/app/src/main/java/com/uiui/zyappstore/utils/JGYUtils.java +++ b/app/src/main/java/com/uiui/zyappstore/utils/JGYUtils.java @@ -45,6 +45,7 @@ public class JGYUtils { public static final int UZY12Platform = 7; public static final int Cube8183Platform = 8; public static final int Teclast8183Platform = 9; + public static final int ipaly50SEPlatform = 10; public static final int UnknowPlatform = 0; public static final String MTKTag = "MTK"; @@ -54,6 +55,7 @@ public class JGYUtils { public static final String UZY12Tag = "UZY12"; public static final String Cube8183Tag = "cube8183"; public static final String TeclastMTK12Tag = "teclast8183"; + public static final String ipaly50SETag = "ipaly50SE"; private JGYUtils(Context context) { @@ -324,6 +326,9 @@ public class JGYUtils { } else if (TeclastMTK12Tag.equalsIgnoreCase(platform)) { Log.i(TAG, "checkAppPlatform: " + "teclast8183"); return Teclast8183Platform; + }else if (ipaly50SETag.equalsIgnoreCase(platform)) { + Log.i(TAG, "checkAppPlatform: " + "ipaly50SE"); + return ipaly50SEPlatform; } else { Log.i(TAG, "checkAppPlatform: " + "没有数据"); return UnknowPlatform; @@ -359,6 +364,8 @@ public class JGYUtils { getAppPlatformCallback.AppPlatform(Teclast8183Platform); } else if (Cube8183Tag.equalsIgnoreCase(platform)) { getAppPlatformCallback.AppPlatform(Cube8183Platform); + } else if (ipaly50SETag.equalsIgnoreCase(platform)) { + getAppPlatformCallback.AppPlatform(ipaly50SEPlatform); } else { getAppPlatformCallback.AppPlatform(UnknowPlatform); } diff --git a/app/src/main/java/com/uiui/zyappstore/utils/Utils.java b/app/src/main/java/com/uiui/zyappstore/utils/Utils.java index ff49a8f..625ae4d 100644 --- a/app/src/main/java/com/uiui/zyappstore/utils/Utils.java +++ b/app/src/main/java/com/uiui/zyappstore/utils/Utils.java @@ -649,36 +649,31 @@ public class Utils { context.startActivity(intent); } + /** + * 获取设备序列号 + * + * @return + */ + @SuppressLint({"MissingPermission", "NewApi"}) public static String getSerial() { - String mac = JGYUtils.getInstance().getPushMac(); - return mac; + String serial = "unknow"; + try { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+ + serial = Build.getSerial(); + } else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {//8.0+ + serial = Build.SERIAL; + } else {//8.0- + Class c = Class.forName("android.os.SystemProperties"); + Method get = c.getMethod("get", String.class); + serial = (String) get.invoke(c, "ro.serialno"); + } + } catch (Exception e) { + e.printStackTrace(); + Log.e("e", "读取设备序列号异常:" + e.toString()); + } + return serial; } -// /** -// * 获取设备序列号 -// * -// * @return -// */ -// @SuppressLint({"MissingPermission", "NewApi"}) -// public static String getSerial() { -// String serial = "unknow"; -// try { -// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+ -// serial = Build.getSerial(); -// } else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {//8.0+ -// serial = Build.SERIAL; -// } else {//8.0- -// Class c = Class.forName("android.os.SystemProperties"); -// Method get = c.getMethod("get", String.class); -// serial = (String) get.invoke(c, "ro.serialno"); -// } -// } catch (Exception e) { -// e.printStackTrace(); -// Log.e("e", "读取设备序列号异常:" + e.toString()); -// } -// return serial; -// } - /** * @param context 获取真实的MAC地址 * @return