首次提交信息
This commit is contained in:
103
app/src/main/java/com/xscm/midi/AppContext.java
Normal file
103
app/src/main/java/com/xscm/midi/AppContext.java
Normal file
@@ -0,0 +1,103 @@
|
||||
package com.xscm.midi;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/3.
|
||||
*/
|
||||
|
||||
public class AppContext extends CommonAppContext {
|
||||
|
||||
private boolean mBeautyInited;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
ToastUtils.init(this);
|
||||
ARouter.init(this);
|
||||
|
||||
/* mqttClient = MyMQTTClient.getInstance(this);
|
||||
mqttClient.initialize("tcp://81.70.45.221:1883");
|
||||
new Thread(() -> {
|
||||
boolean connected = mqttClient.connect();
|
||||
runOnUiThread(() -> {
|
||||
if (connected) {
|
||||
} else {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("MQTT连接失败");
|
||||
}
|
||||
});
|
||||
}).start();*/
|
||||
|
||||
// ToastUtils.setInterceptor(new IToastInterceptor() {
|
||||
// @Override
|
||||
// public boolean intercept(CharSequence charSequence) {
|
||||
// return !CommonAppContext.getInstance().isFront();
|
||||
// }
|
||||
// });
|
||||
// L.setDeBug(BuildConfig.DEBUG);
|
||||
}
|
||||
public static void initSdk() {
|
||||
// CommonAppContext context = CommonAppContext.getInstance();
|
||||
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// L.e("应用签名:" + context.getAppSignature());
|
||||
// //L.e("facebook散列秘钥------>" + context.getFacebookHashKey());
|
||||
// }
|
||||
// //腾讯云直播鉴权url
|
||||
// String liveLicenceUrl = "https://license.vod2.myqcloud.com/license/v2/1346816652_1/v_cube.license";
|
||||
// //腾讯云直播鉴权key
|
||||
// String liveKey = "c30f209835056ba00f738a014ca4448a";
|
||||
// //腾讯云视频鉴权url
|
||||
// String ugcLicenceUrl = "https://license.vod2.myqcloud.com/license/v2/1346816652_1/v_cube.license";
|
||||
// //腾讯云视频鉴权key
|
||||
// String ugcKey = "c30f209835056ba00f738a014ca4448a";
|
||||
// TXLiveBase.getInstance().setDebug(BuildConfig.DEBUG);
|
||||
// TXLiveBase.getInstance().setLicence(context, liveLicenceUrl, liveKey, ugcLicenceUrl, ugcKey);
|
||||
// //初始化腾讯bugly
|
||||
// CrashReport.initCrashReport(context);
|
||||
// CrashReport.setAppVersion(context, CommonAppConfig.getInstance().getVersion());
|
||||
// //初始化ShareSdk
|
||||
// MobSDK.init(context);
|
||||
// MobSDK.submitPolicyGrantResult(true);
|
||||
// //初始化IM
|
||||
// ImMessageUtil.getInstance().init();
|
||||
// //初始化腾讯TPNS 移动推送
|
||||
// TpnsUtil.register(BuildConfig.DEBUG);
|
||||
// //初始化友盟统计
|
||||
// UmengUtil.init(context, BuildConfig.DEBUG);
|
||||
// //OpenInstall
|
||||
// OpenInstall.init(context);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化美狐
|
||||
*/
|
||||
public void initBeautySdk(String beautyAppId, String beautyKey) {
|
||||
// if (!TextUtils.isEmpty(beautyAppId) && !TextUtils.isEmpty(beautyKey)) {
|
||||
// if (!mBeautyInited) {
|
||||
// mBeautyInited = true;
|
||||
// if (CommonAppConfig.isYunBaoApp()) {
|
||||
// beautyAppId = DecryptUtil.decrypt(beautyAppId);
|
||||
// beautyKey = DecryptUtil.decrypt(beautyKey);
|
||||
// }
|
||||
// MHSDK.init(this, beautyAppId, beautyKey);
|
||||
// CommonAppConfig.getInstance().setMhBeautyEnable(true);
|
||||
// L.e("美狐初始化----AppId--->" + beautyAppId + "---AppKey--->" + beautyKey);
|
||||
// }
|
||||
// } else {
|
||||
// CommonAppConfig.getInstance().setMhBeautyEnable(false);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startInitSdk() {
|
||||
initSdk();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user