Commit 8be8f941 authored by wanglei's avatar wanglei

....

parent d7b4c5a7
......@@ -4,11 +4,8 @@ import android.content.Intent
import android.widget.Toast
import androidx.activity.addCallback
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper
import com.base.filerecoveryrecyclebin.ads.admob.AdmobInterstitialUtils
import com.base.filerecoveryrecyclebin.ads.max.AdMaxInterstitialUtils
import com.base.filerecoveryrecyclebin.databinding.ActivityRepeatAnimationBinding
import com.base.filerecoveryrecyclebin.help.BaseActivity
import com.base.filerecoveryrecyclebin.help.ConfigHelper
import kotlin.random.Random
class RepeatAnimationActivity : BaseActivity<ActivityRepeatAnimationBinding>() {
......
......@@ -14,6 +14,7 @@ import com.base.filerecoveryrecyclebin.ads.max.AdMaxNativeUtils
import com.base.filerecoveryrecyclebin.ads.max.AdMaxOpenUtils
import com.base.filerecoveryrecyclebin.help.BaseApplication
import com.base.filerecoveryrecyclebin.utils.AppPreferences
import com.base.filerecoveryrecyclebin.utils.LogEx
import com.google.android.gms.ads.MobileAds
import java.util.concurrent.atomic.AtomicBoolean
......@@ -38,12 +39,14 @@ object AdmobMaxHelper {
return
}
if (getSpAdmobTrueMaxFalse()) {
LogEx.logDebug(TAG,"init sp Admob")
if (!isAdInit.get()) {
MobileAds.initialize(BaseApplication.context) { initializationStatus ->
isAdInit.set(true)
}
}
} else {
LogEx.logDebug(TAG,"init sp AdMax")
if (!isAdInit.get()) {
BaseApplication.context.initAdMax()
}
......
package com.base.filerecoveryrecyclebin.ads.max
import android.content.Context
import com.applovin.sdk.AppLovinMediationProvider
import com.applovin.sdk.AppLovinSdk
import com.applovin.sdk.AppLovinSdkInitializationConfiguration
import com.base.filerecoveryrecyclebin.ads.AdmobMaxHelper.isAdInit
import com.base.filerecoveryrecyclebin.utils.EventUtils
import com.base.filerecoveryrecyclebin.utils.LogEx
import com.google.android.gms.ads.identifier.AdvertisingIdClient
import java.util.Collections
......@@ -17,8 +19,8 @@ object AdMaxInit {
fun Context.initAdMax() {
// If you want to test your own AppLovin SDK key, change the value here and update the package name in the build.gradle
val YOUR_SDK_KEY = "05TMDQ5tZabpXQ45_UTbmEGNUtVAzSTzT6KmWQc5_CuWdzccS4DCITZoL3yIWUG3bbq60QC_d4WF28tUC4gVTF"
// val YOUR_SDK_KEY="GGPreND6SRmCt1zJgn5faiLGD8c2PVGPLgPpSg7cHanVTud1DhtuI9MmteTqlEviaJ57WnxW68kQDaATJ5z3cW"
// val YOUR_SDK_KEY = "05TMDQ5tZabpXQ45_UTbmEGNUtVAzSTzT6KmWQc5_CuWdzccS4DCITZoL3yIWUG3bbq60QC_d4WF28tUC4gVTF"
val YOUR_SDK_KEY = "GGPreND6SRmCt1zJgn5faiLGD8c2PVGPLgPpSg7cHanVTud1DhtuI9MmteTqlEviaJ57WnxW68kQDaATJ5z3cW"
val executor = Executors.newSingleThreadExecutor();
executor.execute {
......@@ -38,6 +40,8 @@ object AdMaxInit {
LogEx.logDebug(TAG, "max init")
isAdInit.set(true)
maxInitAction?.invoke()
maxInitAction = null
EventUtils.event("MaxInit", "MaxInit")
}
executor.shutdown()
......
......@@ -19,9 +19,9 @@ object ConfigHelper {
const val openAdmobId = "/6499/example/app-open"
const val bannerAdmobId = "ca-app-pub-3940256099942544/9214589111"
const val interAdMaxId = "a"
const val nativeAdMaxId = "b"
const val openAdMaxId = "c"
const val interAdMaxId = "b31e7f6d11ee659e"
const val nativeAdMaxId = "96e8fe78b0efc5d1"
const val openAdMaxId = "d1d943cdd3127c90"
const val bannerMaxId = "ca-app-pub-3940256099942544/9214589741"
//一定展示大图广告
......
......@@ -32,7 +32,6 @@ object PermissionDialog {
})
}
dialog.setOnDismissListener {
LogEx.logDebug(TAG, "dismissAction 2")
dismissAction.invoke()
}
return dialog
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment