Commit 2d9b4206 authored by wanglei's avatar wanglei

[商业化]上报链

parent bf1c775b
......@@ -111,8 +111,8 @@ object AdsMgr {
if (adsConfigBean.adSwitch) {
admobInitCallBack?.invoke()
admobInitCallBack = null
adNativeMgr.loadAd(MyApplication.appContext, AdmobEvent("nativeAd", "preload"), null)
// adOpenMgr.loadAd(context, true, AdmobEvent("openAd", context::class.java.simpleName))
adNativeMgr.loadAd(context, AdmobEvent("nativeAd", context::class.java.simpleName))
adOpenMgr.loadAd(context, AdmobEvent("openAd", context::class.java.simpleName))
adInterMgr.loadAd(context, AdmobEvent("interAd", context::class.java.simpleName))
}
}
......
......@@ -96,10 +96,13 @@ class AdInterMgr {
private fun showReadyAd() {
val adEvent = (adState.currentAdEvent as AdmobEvent?)
val ac = adState.activityRef?.get()
LogEx.logDebug("AdmobEvent", "inter showReadyAd ac=$ac currentAd=${adState.currentAd}")
val tag = adEvent?.TAG ?: ""
LogEx.logDebug(tag, "showReadyAd ac=$ac currentAd=${adState.currentAd}")
if (ac == null || ac.isFinishing || ac.isDestroyed) {
LogEx.logDebug(TAG, "showReadyAd ac=null isFinishing isDestroyed")
LogEx.logDebug(tag, "showReadyAd ac=null isFinishing isDestroyed")
showCallBack?.failed()
adState.onAdDisplayFailed()
return
......@@ -107,8 +110,6 @@ class AdInterMgr {
adState.currentAd?.run {
val adEvent = (adState.currentAdEvent as AdmobEvent?)
fullScreenContentCallback = object : FullScreenContentCallback() {
override fun onAdShowedFullScreenContent() {
super.onAdShowedFullScreenContent()
......
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