version:zhanrui 6.4.0

fix:
update:更换推送
This commit is contained in:
2023-06-17 09:30:06 +08:00
parent c508b65b58
commit 625a121cbb
34 changed files with 676 additions and 1703 deletions

View File

@@ -1,26 +1,20 @@
package com.aoleyun.os.network;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.aoleyun.os.network.bean.AppPasswdBean;
import com.aoleyun.os.network.bean.BaseResponse;
import com.aoleyun.os.uiuiutils.APKUtils;
//import com.aoleyun.os.jpush.TagAliasOperatorHelper;
import com.aoleyun.os.uiuiutils.JGYUtils;
import com.aoleyun.os.uiuiutils.TimeUtils;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.tencent.mmkv.MMKV;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import io.reactivex.Observer;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
/**
@@ -66,56 +60,6 @@ public class HTTPInterface {
});
}
synchronized public static void setJpushTags(final Context context) {
NetInterfaceManager.getInstance()
.getJpushTagsObservable()
.subscribe(new Observer<BaseResponse>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
Log.e(TAG + ":" + "setJpushTags", "onSubscribe: ");
}
@Override
public void onNext(@NonNull BaseResponse response) {
if (response.code == 200) {
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
String batch = jsonObject.get("batch").getAsString();
Log.e(TAG + ":" + "setJpushTags", "onNext: " + batch);
if (!TextUtils.isEmpty(batch)) {
Set set = new HashSet();
set.add(batch);
JGYUtils.getInstance().getAppPlatform(new JGYUtils.GetAppPlatformCallback() {
@Override
public void AppPlatform(int platform) {
if (platform == JGYUtils.MTKPlatform) {
set.add(JGYUtils.MTKTag);
} else if (platform == JGYUtils.ZhanruiPlatform) {
set.add(JGYUtils.ZhanruiTag);
}
}
});
// setTag(context, set);
} else {
Log.e(TAG + ":" + "setJpushTags", "onNext: " + "batch empty");
}
} else {
Log.e(TAG + ":" + "setJpushTags", "onNext: " + response.toString());
}
}
@Override
public void onError(@NonNull Throwable e) {
Log.e(TAG + ":" + "setJpushTags", "onError: " + e.getMessage());
onComplete();
}
@Override
public void onComplete() {
Log.e(TAG + ":" + "setJpushTags", "onComplete: ");
}
});
}
/**
* 发送正在运行的app信息
*