package com.cooleshow.teacher.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() {
        CrashReport.initCrashReport(Utils.getApp(), "c4d163184a", false);
        UMConfigure.init(
                Utils.getApp(),
                "62a8394605844627b5b0554b",
                "app",
                UMConfigure.DEVICE_TYPE_PHONE,
                null
        );
        //QQ官方sdk授权
        Tencent.setIsPermissionGranted(true);
        String FileProvider = "com.cooleshow.teacher.fileprovider";
        PlatformConfig.setWeixin("wx149a928c415c137a", "d3f119b577ccacb262da153f4210174f");
        PlatformConfig.setWXFileProvider(FileProvider);
        PlatformConfig.setSinaWeibo("755965096", "8a4d2b76bbb2006e62e21ac9014435da", "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());
    }
}
