version:2.1

fix:完善推送
update:
This commit is contained in:
2022-01-25 16:12:36 +08:00
parent a432526311
commit edf23945b5
36 changed files with 2692 additions and 945 deletions

View File

@@ -89,7 +89,6 @@ import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import cn.jpush.android.api.JPushInterface;
import static android.app.ActivityManager.RECENT_IGNORE_UNAVAILABLE;
@@ -112,7 +111,11 @@ public class JGYUtils {
}
private JGYUtils(Context context) {
if (context == null) {
throw new RuntimeException("Context is NULL");
}
this.mContext = context;
}
public static void init(Context context) {
@@ -939,6 +942,12 @@ public class JGYUtils {
this.add("com.aoleyunos.dop1");
this.add("com.aoleyunos.dop2");
this.add("com.aoleyun.info");
this.add("com.calculator.uiui");
this.add("com.notepad.uiui");
this.add("com.calendar.uiui");
this.add("com.alarmclock.uiui");
this.add("com.uiui.videoplayer");
}};
HashSet<String> pkgSet = new HashSet<>(Arrays.asList(packageList.split(",")));
pkgSet.addAll(packages);
@@ -1838,7 +1847,8 @@ public class JGYUtils {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("sn", Utils.getSerial());
jsonObject.addProperty("mac", Utils.getAndroid10MAC(mContext));
jsonObject.addProperty("jpush_id", JPushInterface.getRegistrationID(mContext));
// jsonObject.addProperty("jpush_id", JPushInterface.getRegistrationID(mContext));
jsonObject.addProperty("jpush_id", "0000");
jsonObject.addProperty("devices_version", Utils.getCustomVersion());
jsonObject.addProperty("appstore_version", BuildConfig.VERSION_NAME);
jsonObject.addProperty("store_version", Utils.getAPPVersionName(PackageNames.APPSTORE, mContext));
@@ -1849,6 +1859,7 @@ public class JGYUtils {
jsonObject.addProperty("LAN_ip", Utils.getIPAddress(mContext));
jsonObject.addProperty("bluetooth", Utils.getBluetoothList());
jsonObject.addProperty("wifi_name", Utils.getWifiAlias(mContext));
jsonObject.addProperty("platform", JGYUtils.getInstance().getAppPlatform());
return jsonObject.toString();
}