|
@@ -2,7 +2,9 @@ package com.cooleshow.student.helper;
|
|
|
|
|
|
import com.cooleshow.base.common.BaseApplication;
|
|
|
import com.cooleshow.base.utils.Utils;
|
|
|
+import com.cooleshow.usercenter.helper.UserHelper;
|
|
|
import com.tencent.bugly.crashreport.CrashReport;
|
|
|
+import com.tencent.qcloud.tim.tuiofflinepush.PrivateConstants;
|
|
|
import com.tencent.tauth.Tencent;
|
|
|
import com.umeng.commonsdk.UMConfigure;
|
|
|
import com.umeng.socialize.PlatformConfig;
|
|
@@ -17,6 +19,7 @@ public class InitHelper {
|
|
|
public static void initSdK() {
|
|
|
//bugly
|
|
|
CrashReport.initCrashReport(Utils.getApp(), "b51fd73164", false);
|
|
|
+ initIM();
|
|
|
//友盟
|
|
|
UMConfigure.init(
|
|
|
Utils.getApp(),
|
|
@@ -26,7 +29,7 @@ public class InitHelper {
|
|
|
null
|
|
|
);
|
|
|
Tencent.setIsPermissionGranted(true);
|
|
|
- String FileProvider = "com.cooleshow.student.fileprovider";
|
|
|
+ String FileProvider = Utils.getApp().getPackageName()+".fileprovider";
|
|
|
PlatformConfig.setWeixin("wx97408cd22c879ff7", "665a1608a16631dee40d737b4d1a0ad1");
|
|
|
PlatformConfig.setWXFileProvider(FileProvider);
|
|
|
PlatformConfig.setSinaWeibo("3712190405", "e77924e0125dbd751bab61063d8338fb", "http://sns.whalecloud.com");
|
|
@@ -38,4 +41,17 @@ public class InitHelper {
|
|
|
JCollectionAuth.setAuth(Utils.getApp(), true);
|
|
|
BaseApplication.registrationId = JPushInterface.getRegistrationID(Utils.getApp());
|
|
|
}
|
|
|
+
|
|
|
+ public static void initIM() {
|
|
|
+ if (UserHelper.isAgreePrivacy()) {
|
|
|
+ //todo 学生端已配置小米 其余需要验证
|
|
|
+ PrivateConstants.xiaomiPushBussinessId=31483;
|
|
|
+ PrivateConstants.xiaomiPushAppId = "2882303761520172242";
|
|
|
+ PrivateConstants.xiaomiPushAppKey = "5692017221242";
|
|
|
+ PrivateConstants.oppoPushBussinessId=31484;
|
|
|
+ PrivateConstants.oppoPushAppKey="72945e3136e4483ab8f512332fb5ddc5";
|
|
|
+ PrivateConstants.oppoPushAppSecret="9c1ad86dc42d4d62a1f7f763bcc3fc87";
|
|
|
+ PrivateConstants.vivoPushBussinessId=30512;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|