version:2.0
fix:修复获取个人信息失败 add:
This commit is contained in:
@@ -45,6 +45,16 @@ android {
|
||||
includeCompileClasspath true
|
||||
}
|
||||
}
|
||||
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.uiui.sn",
|
||||
JPUSH_APPKEY : "1a1e405ca5a1a5cd50e9f734", //JPush 上注册的包名对应的 Appkey.
|
||||
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
|
||||
XG_ACCESS_ID : "1500026387",
|
||||
XG_ACCESS_KEY: "AG2PUQL7TEX5",
|
||||
]
|
||||
buildConfigField "String", "SCREEN_URL", '"https://led.aolelearn.cn:3018/wm/is_online"'
|
||||
buildConfigField "String", "WEBSOCKET_URL", '"wss://led.aolelearn.cn:3018"'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@@ -60,32 +70,14 @@ android {
|
||||
productFlavors {
|
||||
beta {
|
||||
flavorDimensions "default"
|
||||
versionCode 10
|
||||
versionName "1.9"
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.uiui.sn",
|
||||
JPUSH_APPKEY : "1a1e405ca5a1a5cd50e9f734", //JPush 上注册的包名对应的 Appkey.
|
||||
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
|
||||
XG_ACCESS_ID : "1500026387",
|
||||
XG_ACCESS_KEY: "AG2PUQL7TEX5",
|
||||
]
|
||||
buildConfigField "String", "SCREEN_URL", '"https://led.aolelearn.cn:3018/wm/is_online"'
|
||||
buildConfigField "String", "WEBSOCKET_URL", '"wss://led.aolelearn.cn:3018"'
|
||||
versionCode 11
|
||||
versionName "2.0"
|
||||
}
|
||||
|
||||
official {
|
||||
flavorDimensions "default"
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.uiui.sn",
|
||||
JPUSH_APPKEY : "1a1e405ca5a1a5cd50e9f734", //JPush 上注册的包名对应的 Appkey.
|
||||
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
|
||||
XG_ACCESS_ID : "1500026387",
|
||||
XG_ACCESS_KEY: "AG2PUQL7TEX5",
|
||||
]
|
||||
buildConfigField "String", "SCREEN_URL", '"https://led.aolelearn.cn:3018/wm/is_online"'
|
||||
buildConfigField "String", "WEBSOCKET_URL", '"wss://led.aolelearn.cn:3018"'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,16 +92,7 @@ android {
|
||||
v2SigningEnabled true
|
||||
}
|
||||
|
||||
debug {
|
||||
storeFile file("src/keys/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
keyPassword "123456"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
|
||||
release {// 签名文件
|
||||
mtk {
|
||||
storeFile file("src/keys/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
@@ -120,33 +103,36 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
zhanRuiDebug.initWith(debug)
|
||||
zhanRuiDebug {
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "8d89de548781c72b984c4b45b146bf1e"
|
||||
]
|
||||
debuggable true
|
||||
versionNameSuffix "-debug"
|
||||
signingConfig signingConfigs.zhanRui
|
||||
}
|
||||
|
||||
zhanRuiRelease.initWith(release)
|
||||
zhanRuiRelease {
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
signingConfig signingConfigs.zhanRui
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "8d89de548781c72b984c4b45b146bf1e"
|
||||
]
|
||||
}
|
||||
|
||||
zhanRuiDebug.initWith(debug)
|
||||
zhanRuiDebug {
|
||||
versionNameSuffix "-debug"
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
debuggable true
|
||||
signingConfig signingConfigs.zhanRui
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "8d89de548781c72b984c4b45b146bf1e"
|
||||
]
|
||||
}
|
||||
|
||||
debug {
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "8d89de548781c72b984c4b45b146bf1e"
|
||||
]
|
||||
versionNameSuffix "-debug"
|
||||
minifyEnabled false
|
||||
//Zipalign优化
|
||||
zipAlignEnabled true
|
||||
signingConfig signingConfigs.debug
|
||||
minifyEnabled false
|
||||
signingConfig signingConfigs.mtk
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
if (outputFile != null) {
|
||||
@@ -155,21 +141,21 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "8d89de548781c72b984c4b45b146bf1e"
|
||||
]
|
||||
}
|
||||
|
||||
release {
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
//混淆
|
||||
minifyEnabled false
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "8d89de548781c72b984c4b45b146bf1e"
|
||||
]
|
||||
//Zipalign优化
|
||||
zipAlignEnabled true
|
||||
//混淆
|
||||
minifyEnabled false
|
||||
//前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
//签名
|
||||
signingConfig signingConfigs.release
|
||||
signingConfig signingConfigs.mtk
|
||||
// 将release版本的包名重命名,加上版本及日期
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
@@ -180,9 +166,6 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
manifestPlaceholders = [
|
||||
AMAP_KEY: "8d89de548781c72b984c4b45b146bf1e"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,10 +182,10 @@ dependencies {
|
||||
compileOnly files('libs/framework.jar')
|
||||
|
||||
//implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
|
||||
@@ -1580,11 +1580,19 @@ public class NetInterfaceManager {
|
||||
softwareJson.addProperty("learning_version", ApkUtils.getAPPVersionName(mContext, "com.info.learning"));
|
||||
softwareJson.addProperty("chat_version", ApkUtils.getAPPVersionName(mContext, "com.info.chat"));
|
||||
softwareJson.addProperty("jpush_id", JPushInterface.getRegistrationID(mContext));
|
||||
softwareJson.addProperty("notice_version", ApkUtils.getAPPVersionName(mContext, "com.uiui.info"));
|
||||
softwareJson.addProperty("browser_version", ApkUtils.getAPPVersionName(mContext, "com.uiui.browser"));
|
||||
softwareJson.addProperty("desktop_version", ApkUtils.getAPPVersionName(mContext, "com.uiui.os"));
|
||||
|
||||
String addr = jsonObject.toString();
|
||||
String machine = Utils.getMachine(mContext);
|
||||
String hardware = Utils.getHardware(mContext);
|
||||
Log.e(TAG, "updateAdminInfo: getHardware = " + hardware);
|
||||
String software = softwareJson.toString();
|
||||
if (BuildConfig.DEBUG){
|
||||
Log.e(TAG, "updateAdminInfo: machine = " + machine);
|
||||
Log.e(TAG, "updateAdminInfo: getHardware = " + hardware);
|
||||
Log.e(TAG, "updateAdminInfo: software = " + software);
|
||||
}
|
||||
getUpdateAdminSnControl().sendAdminSn(
|
||||
Utils.getSerial(),
|
||||
addr,
|
||||
|
||||
@@ -1007,7 +1007,12 @@ public class Utils {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void getBatterymAh(Context context) {
|
||||
/**
|
||||
* 获取电池容量
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
public static double getBatterymAh(Context context) {
|
||||
Object mPowerProfile;
|
||||
double batteryCapacity = 0; //电池的容量mAh
|
||||
final String POWER_PROFILE_CLASS = "com.android.internal.os.PowerProfile";
|
||||
@@ -1019,6 +1024,7 @@ public class Utils {
|
||||
Log.e("getBattery", "get batteryCapacity mAh error:" + batteryCapacity);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return batteryCapacity;
|
||||
}
|
||||
|
||||
synchronized private static int getBatteryLevel(Context mContext) {
|
||||
@@ -1226,6 +1232,7 @@ public class Utils {
|
||||
jsonObject.put("wifi_ssid", getWifiSSID(context));
|
||||
jsonObject.put("wifi_time", wifi_time);
|
||||
jsonObject.put("boot_time", SystemClock.elapsedRealtime());
|
||||
jsonObject.put("battery_capacity", Utils.getBatterymAh(context));
|
||||
Log.e(TAG, "getHardware: " + jsonObject.toJSONString());
|
||||
return jsonObject.toJSONString();
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bind"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
@@ -133,6 +134,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/applet_qrcode"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
android:text="@string/scan_tips"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -133,6 +134,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/applet_qrcode"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
Reference in New Issue
Block a user