Zima
Zima

Reputation: 176

AdMob to show interstitial ad with sample test unit id

I am using AdMob in my app (and it is published on google play). I am developing and testing it on my real device. For debugging, I set AdMob App ID and AdMob Unit IDs to sample ids as admob's guide post but sometimes while debugging, a real interstitial ad appears!! how can I stop it?

Test IDs:

Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713
test Ad Unit ID for Android Interstitials:ca-app-pub-3940256099942544/1033173712

Does it need to introduce my device as a test device? I never click and always choose skip button but I worry about AdMob privacy. I don't want to violate it.

Upvotes: 1

Views: 1462

Answers (1)

Kasiopeous
Kasiopeous

Reputation: 196

You might need to add your device in the AdRequest Builder if you have not done so already. Usually when seeing real life ads you should see the following message inside your LogCat. If that is the case just copy the ID which is printed and add it to your AdRequest. That should solve your issue.

I/Ads: Use AdRequest.Builder.addTestDevice("33BE2250B43518CCDA7DE426D04EE231")
to get test ads on this device."

You can readup on how to successfully get test ads in debug mode here.

Upvotes: 2

Related Questions