package com.cooleshow.student.helper;

import com.cooleshow.base.common.BaseApplication;
import com.cooleshow.base.utils.Utils;
import com.tencent.bugly.crashreport.CrashReport;
import com.tencent.tauth.Tencent;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.socialize.PlatformConfig;

import cn.jiguang.api.utils.JCollectionAuth;
import cn.jpush.android.api.JPushInterface;

/**
 * Author by pq, Date on 2022/7/25.
 */
public class InitHelper {
    public static void initSdK() {
        //bugly
        CrashReport.initCrashReport(Utils.getApp(), "b51fd73164", false);
        //友盟
        UMConfigure.init(
                Utils.getApp(),
                "5f2b6f03b4b08b653e91a49e",
                "app",
                UMConfigure.DEVICE_TYPE_PHONE,
                null
        );
        Tencent.setIsPermissionGranted(true);
        String FileProvider = "com.cooleshow.student.fileprovider";
        PlatformConfig.setWeixin("wx97408cd22c879ff7", "665a1608a16631dee40d737b4d1a0ad1");
        PlatformConfig.setWXFileProvider(FileProvider);
        PlatformConfig.setSinaWeibo("3712190405", "e77924e0125dbd751bab61063d8338fb", "http://sns.whalecloud.com");
        PlatformConfig.setSinaFileProvider(FileProvider);
        PlatformConfig.setQQZone("1110018403", "fY5gof6GIYnc8Gzx");
        PlatformConfig.setQQFileProvider(FileProvider);
        //极光推送
        //用户同意之后才初始化极光推送
        JCollectionAuth.setAuth(Utils.getApp(), true);
        BaseApplication.registrationId = JPushInterface.getRegistrationID(Utils.getApp());
    }
}
