package com.ysnows.umeng.cc

import com.billy.cc.core.component.CC
import com.billy.cc.core.component.IComponent
import com.umeng.analytics.MobclickAgent
import com.umeng.commonsdk.BuildConfig
import com.umeng.commonsdk.UMConfigure
import com.ysnows.base.base.BApp
import com.ysnows.base.ccextension.BIComponent

class CpUmeng : IComponent, BIComponent() {

    fun init(cc: CC): Boolean {
        // 初始化SDK
        UMConfigure.init(cc.context, BApp.instance()?.config()?.UmengAppKey(), null, UMConfigure.DEVICE_TYPE_PHONE, null);
        // 选用AUTO页面采集模式
        MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
        UMConfigure.setLogEnabled(BuildConfig.DEBUG)

        return false
    }

}