Ad units is empty in AdInspector

22 Views Asked by At

I am trying to integrate admob in my android application and I faced the problem that frequency capping is not working. After that I tried to add ad interspector to check what's going on, but for some reason Ad units are empty and I do not have any ideas what to do.

Here is how I added ad interspector in MainActivity (I use jetpack compose and hiltviewmodels)

@AndroidEntryPoint
class MainActivity : ComponentActivity() {

    @OptIn(ExperimentalMaterial3Api::class)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        MobileAds.initialize(this) {}

        MobileAds.openAdInspector(this) {
        }
    }
}

enter image description here

enter image description here

1

There are 1 best solutions below

1
Popeye The Sailor On

In the end I figured out the problem:

  1. I had to set up device test id:

    val testDeviceIds = listOf("SOME_ID") val configuration = RequestConfiguration.Builder().setTestDeviceIds(testDeviceIds).build() MobileAds.setRequestConfiguration(configuration)

  2. I had to fully reinstall the application. Not just rebuild it via Android Studio, but first delete from the phone and then install again