version:1.3.2
fix: update:修复闪退
This commit is contained in:
@@ -37,6 +37,11 @@ import com.xwad.os.utils.JgyUtils;
|
||||
import com.xwad.os.utils.OpenApkUtils;
|
||||
import com.xwad.os.utils.SystemUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class BaseApplication extends Application {
|
||||
private static final String TAG = "BaseApplication";
|
||||
|
||||
@@ -136,6 +141,22 @@ public class BaseApplication extends Application {
|
||||
Log.e("AliyunPush", "init cloudchannel success");
|
||||
Log.e("AliyunPush", "init cloudchannel success " + pushService.getDeviceId());
|
||||
MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE).encode(CommonConfig.ALIYUN_PUSH_ID, pushService.getDeviceId());
|
||||
|
||||
Set<String> tagSets = new HashSet<>();
|
||||
tagSets.add(BuildConfig.platform);
|
||||
String[] tag = new ArrayList<>(tagSets).toArray(new String[tagSets.size()]);
|
||||
pushService.bindTag(CloudPushService.DEVICE_TARGET, tag, null, new CommonCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
Log.e("AliyunPush", "bind tag " + Arrays.toString(tag) + " success\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorCode, String errorMsg) {
|
||||
Log.e("AliyunPush", "bind tag " + Arrays.toString(tag) + " failed." +
|
||||
"errorCode: " + errorCode + ", errorMsg:" + errorMsg + "\n");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user