SulanSk
SulanSk

Reputation: 31

Admob test ads is not showing on a specific app ,but the same code is working fine on other app

Ad-mob test ads is not showing on one of my app ,but the same code is working fine on my others app, then I find out that this is happening because of the app package name ,if I rename the package name then also ads are showing.

Some months ago the app were showing ads , but app got ads serving limited issue ,then I deleted all the ad units from Admob of the app ,after one week this issue solved ,then I wanted to implement ads again but since then even test ads are not showing.

and I couldn't found an error on logcat so I don't Know what to do

Upvotes: 3

Views: 1729

Answers (2)

darshan
darshan

Reputation: 4569

There are two things here.
Either you show test ads via local configuration before initializing the sdk like -

val testDeviceIds = Arrays.asList("Your Test ID from logcat. ")
val configuration = RequestConfiguration.Builder().setTestDeviceIds(testDeviceIds).build()
MobileAds.setRequestConfiguration(configuration)

Or add the following in your app-ads.txt file.
google.com, pub-3940256099942544, DIRECT, f08c47fec0942fa0.

More info here: https://developers.google.com/admob/android/test-ads

Upvotes: 3

Muhammad Asad
Muhammad Asad

Reputation: 668

Admob does not deliver ad when your app live any time. Add test id's and change your application id then test your implementation. When you live your application then restore your application id in gradle and live your app. When your app live on play store admob deliver your ad.

Upvotes: -1

Related Questions