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.umeng.commonsdk.UMConfigure;

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
        );
        //极光推送
        //用户同意之后才初始化极光推送
        JCollectionAuth.setAuth(Utils.getApp(), true);
        BaseApplication.registrationId = JPushInterface.getRegistrationID(Utils.getApp());
    }
}
