Commit de944271 authored by wanglei's avatar wanglei

...

parent cd1d0688
package com.base.locationsharewhite.ads
import AdInsertMgr
import android.app.Activity
import android.content.Context
import android.view.ViewGroup
import com.base.locationsharewhite.ads.admob.AdBannerMgr
import com.base.locationsharewhite.ads.admob.AdInsertMgr
import com.base.locationsharewhite.ads.admob.AdNativeMgr
import com.base.locationsharewhite.ads.admob.AdOpenMgr
import com.google.android.gms.ads.MobileAds
......@@ -70,10 +70,10 @@ object AdsMgr {
* @param showCallBack 展示回调
*/
fun showOpen(activity: Activity, showCallBack: AdsShowCallBack? = null) {
if (!isInit || adsConfigBean?.isInBlackList != false) {
showCallBack?.failed()
return
}
// if (!isInit || adsConfigBean?.isInBlackList != false) {
// showCallBack?.failed()
// return
// }
adOpenMgr.show(activity, showCallBack)
}
......
......@@ -4,4 +4,5 @@ abstract class AdsShowCallBack {
open fun show() {}
abstract fun close()
abstract fun failed()
abstract fun googleFailed()
}
\ No newline at end of file
package com.base.locationsharewhite.ads.admob
import android.app.Activity
import android.content.Context
import com.base.locationsharewhite.ads.AdsShowCallBack
import com.base.locationsharewhite.ads.BaseAdMgr
import com.base.locationsharewhite.ads.admob.LimitUtils
import com.base.locationsharewhite.helper.config.ConstConfig
import com.google.android.gms.ads.AdError
import com.google.android.gms.ads.AdRequest
......@@ -40,7 +39,7 @@ class AdInsertMgr : BaseAdMgr<InterstitialAd>() {
// 如果确实需要,则必须限制最大重试次数,避免在网络受限的情况下连续多次请求
loadingAd = false
if (activityRef != null && !showingAd && showCallBack != null) {
showCallBack?.failed()
showCallBack?.googleFailed()
showCallBack = null
}
}
......@@ -108,7 +107,7 @@ class AdInsertMgr : BaseAdMgr<InterstitialAd>() {
showingAd = false
currentAd = null
activityRef = null
this@AdInsertMgr.showCallBack?.failed()
this@AdInsertMgr.showCallBack?.googleFailed()
this@AdInsertMgr.showCallBack = null
}
......
......@@ -39,7 +39,7 @@ class AdOpenMgr : BaseAdMgr<AppOpenAd>() {
// 如果确实需要,则必须限制最大重试次数,避免在网络受限的情况下连续多次请求
loadingAd = false
if (activityRef != null && !showingAd && showCallBack != null) {
showCallBack?.failed()
showCallBack?.googleFailed()
showCallBack = null
}
}
......@@ -107,7 +107,7 @@ class AdOpenMgr : BaseAdMgr<AppOpenAd>() {
showingAd = false
currentAd = null
activityRef = null
this@AdOpenMgr.showCallBack?.failed()
this@AdOpenMgr.showCallBack?.googleFailed()
this@AdOpenMgr.showCallBack = null
}
......
......@@ -84,6 +84,11 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(), SplashView {
jumpNext()
}
override fun googleFailed() {
LogEx.logDebug(TAG, "AdsShowCallBack googleFailed")
jumpNext()
}
})
splashPresenter.startJumpJob = true
......
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