Commit 584194bc authored by wanglei's avatar wanglei

...

parent 50dfb0f2
package com.base.pdfviewerscannerwhite.ads package com.base.pdfviewerscannerwhite.ads
import com.base.pdfviewerscannerwhite.ads.admob.AdmobNativeUtils
import com.base.pdfviewerscannerwhite.helper.EventUtils import com.base.pdfviewerscannerwhite.helper.EventUtils
import com.base.pdfviewerscannerwhite.helper.MyApplication import com.base.pdfviewerscannerwhite.helper.MyApplication
import com.base.pdfviewerscannerwhite.utils.AppPreferences import com.base.pdfviewerscannerwhite.utils.AppPreferences
...@@ -60,6 +61,7 @@ object AdmobHelper { ...@@ -60,6 +61,7 @@ object AdmobHelper {
MobileAds.initialize(MyApplication.context) { initializationStatus -> MobileAds.initialize(MyApplication.context) { initializationStatus ->
isAdInit.set(true) isAdInit.set(true)
EventUtils.event("AdmobInit", "AdmobInit") EventUtils.event("AdmobInit", "AdmobInit")
AdmobNativeUtils.loadNativeAd()
} }
} }
......
...@@ -31,7 +31,7 @@ object AdmobNativeUtils { ...@@ -31,7 +31,7 @@ object AdmobNativeUtils {
private val mRequest = AdRequest.Builder().build() private val mRequest = AdRequest.Builder().build()
var onAdLoaded: (() -> Unit)? = null var onAdLoaded: (() -> Unit)? = null
private fun loadNativeAd() { fun loadNativeAd() {
if (nativeAd != null) { if (nativeAd != null) {
return return
} }
......
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