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) {
}
}
}


In the end I figured out the problem:
I had to set up device test id:
val testDeviceIds = listOf("SOME_ID") val configuration = RequestConfiguration.Builder().setTestDeviceIds(testDeviceIds).build() MobileAds.setRequestConfiguration(configuration)
I had to fully reinstall the application. Not just rebuild it via Android Studio, but first delete from the phone and then install again