package com.composition.android.ad.applovinmax.impl

import android.content.Context
import com.applovin.sdk.AppLovinSdk
import com.composition.android.lib.ad.AdManager
import com.composition.android.lib.ad.interfaces.Initialize
import com.composition.android.lib.ad.util.adLogE
import com.composition.android.lib.ad.util.adLogWithFrame

/**
 * @classname:AppLovinMaxInitialize
 * @author: LiuXiaoLong
 * @date: 2022/11/11
 * description: AppLovinMax SDK 初始化默认实现
 */
class AppLovinMaxInitialize(var creativeDebuggerEnabled : Boolean = false, var logging : Boolean = false) : Initialize {

    override fun init(context: Context) {

        AppLovinSdk.getInstance(context).mediationProvider = "max"
        AppLovinSdk.getInstance(context).settings.apply {
            isCreativeDebuggerEnabled = creativeDebuggerEnabled
            setVerboseLogging(logging)
        }
        AppLovinSdk.initializeSdk(context){
            adLogWithFrame(msg = "AppLovinMax广告初始化完成")
        }

    }

}