Commit 2d9b4206 authored by wanglei's avatar wanglei

[商业化]上报链

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