1.4.0117 YX-T01不显示小程序二维码
This commit is contained in:
@@ -9,6 +9,7 @@ import androidx.multidex.MultiDexApplication;
|
||||
|
||||
import com.alibaba.sdk.android.push.CloudPushService;
|
||||
import com.alibaba.sdk.android.push.CommonCallback;
|
||||
import com.alibaba.sdk.android.push.noonesdk.PushInitConfig;
|
||||
import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
|
||||
import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.manager.ConnectManager;
|
||||
@@ -56,6 +57,7 @@ public class BaseApplication extends MultiDexApplication {
|
||||
|
||||
CrashReport.initCrashReport(getApplicationContext(), "b16b3c7f1a", false);
|
||||
CrashReport.setDeviceId(this, Utils.getSerial(this));
|
||||
xcrash.XCrash.init(this);
|
||||
|
||||
PushManager.init(this);
|
||||
initRegisterObservable();
|
||||
@@ -63,7 +65,6 @@ public class BaseApplication extends MultiDexApplication {
|
||||
initTagObservable();
|
||||
aliyunPushInit();
|
||||
|
||||
ToastUtil.init(this);
|
||||
NetInterfaceManager.init(this);
|
||||
JGYUtils.init(this);
|
||||
WiFiUtils.init(this);
|
||||
@@ -135,7 +136,7 @@ public class BaseApplication extends MultiDexApplication {
|
||||
@Override
|
||||
public void onNext(String code) {
|
||||
Log.e("initRegisterObservable", "onNext: " + code);
|
||||
switch (code){
|
||||
switch (code) {
|
||||
case "PUSH_20110":
|
||||
break;
|
||||
default:
|
||||
@@ -158,8 +159,14 @@ public class BaseApplication extends MultiDexApplication {
|
||||
|
||||
|
||||
private void aliyunPushInit() {
|
||||
PushServiceFactory.init(this);
|
||||
final CloudPushService pushService = PushServiceFactory.getCloudPushService();
|
||||
// 特殊场景 需要定时拉起channel
|
||||
PushInitConfig config = new PushInitConfig.Builder()
|
||||
.application(this)
|
||||
.loopStartChannel(true)
|
||||
.loopInterval(60 * 10 * 1000)
|
||||
.build();
|
||||
PushServiceFactory.init(config);
|
||||
CloudPushService pushService = PushServiceFactory.getCloudPushService();
|
||||
pushService.setLogLevel(CloudPushService.LOG_DEBUG);
|
||||
pushService.register(this, new CommonCallback() {
|
||||
@Override
|
||||
@@ -206,7 +213,7 @@ public class BaseApplication extends MultiDexApplication {
|
||||
@Override
|
||||
public void onNext(String code) {
|
||||
Log.e("initAliasObservable", "onNext: " + code);
|
||||
switch (code){
|
||||
switch (code) {
|
||||
case "PUSH_20101":
|
||||
aliyunPushInit();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user