package com.composition.android.ad.gromore.load.impl

import android.content.Context
import android.os.Build
import com.bytedance.msdk.api.v2.*
import com.composition.android.lib.ad.interfaces.Initialize
import com.convenient.android.common.config.MyPdfBaseModule

/**
 * @classname:
 * @author: LiuXiaoLong
 * @date: 2022/9/15
 * description:GroMore SDK初始化
 */
class GroMoreInitialize(var appId : String) : Initialize {


    override fun init(context: Context) {

        GMMediationAdSdk.initialize(context, GMAdConfig.Builder()
            .setAppId(appId)
            .setAppName(context.packageName)
            .setDebug(MyPdfBaseModule.isDebug)
            .setOpenAdnTest(false)
            .setPrivacyConfig(object : GMPrivacyConfig(){
                override fun isCanUsePhoneState(): Boolean {
                    return true
                }

                override fun getMacAddress(): String {
                    return ""
                }

                override fun getAgeGroup(): GMAdConstant.ADULT_STATE {
                    return GMAdConstant.ADULT_STATE.AGE_ADULT
                }
            })
            .build())
    }
}