瀏覽代碼

【APP】修改部分代码

liuxiaolong 1 年之前
父節點
當前提交
f5fb9acc51

+ 1 - 9
app/src/main/java/com/convenient/android/lib/ui/sample/ad/AdMainActivity.kt

@@ -28,21 +28,13 @@ class AdMainActivity : AppCompatActivity() {
     }
 
 
-    private fun initAd(){
+    private fun initAd() {
         AdManager.instance.init(applicationContext, true)
         AdManager.instance.initAdvertisersSDK(applicationContext, AdmobInitialize(), CSJInitialize("5320990"), GroMoreInitialize("5320990"), AppLovinMaxInitialize(logging = true))
         val list = mutableListOf<AdUnitBean>()
         list.addAll(Datas.AdmobAdUnitList)
-        for (adUnitBean in list) {
-            Log.e("AdUnit", adUnitBean.adSlotName)
-        }
         AdUnitConfigManager.instance.setAdUnits(list)
-        AdUnitConfigManager.instance.removeAdUnit(Datas.BANNER)
-        Log.e("AdUnit", "删除后-----")
 
-        for (adUnitBean in AdUnitConfigManager.instance.getAllAdUnits()) {
-            Log.e("AdUnit", adUnitBean.adSlotName)
-        }
 //        list.addAll(Datas.CSJAdUnitList)
 //        list.addAll(Datas.GroMoreAdUnitList)
 //        list.addAll(Datas.AppLovinMaxAdUnitList)

+ 0 - 1
app/src/main/java/com/convenient/android/lib/ui/sample/ad/viewmodel/AdConfigViewModel.kt

@@ -21,7 +21,6 @@ class AdConfigViewModel : ViewModel() {
 
     var advertisers = mutableStateOf(Advertisers.UNKNOWN)
 
-
     fun changeRegisterAdvertisers(advertisers: Advertisers) {
         if (this.advertisers.value == advertisers) {
             this.advertisers.value = Advertisers.UNKNOWN