0
votes

I am developing an Android application and have integrated AdMob through Firebase as described on

https://firebase.google.com/docs/admob/android/quick-start and https://developers.google.com/admob/android/banner

Now, using their test ad id such as

adView.setAdUnitId("ca-app-pub-3940256099942544/6300978111");

Everything works fine, and I can see their dummy-content. However, I need to change this before building final apk before release. But my question is, and I've tried to find the answer in both firebase docs and adword docs, can I use the app myself, and how can I make sure the content is real ad content (starting the app myself) without being afraid to get banned from the ad system.

1

1 Answers

0
votes

If you run it on Emulator, add emulator as test device

AdRequest request = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR) 
.build();

Elsewere if you run it on real device, add it as a test device like this :

 .addTestDevice(“YOUR DEVICE ID”)

To get your device ID, run your app on a real device and when AdRequest is built, go to logcat and filter by AdRequest, you will say something like

this I/Ads(....): To get test ads on this device, call adRequest.addTestDevice("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");"

Then copy and past the code to add it to your adrequest and it will be done