3
votes

I followed the exact guidelines given in firebase docs to show admob ads in my app. I added both emulator and my device ID as test devices in the AdBuilder. So the AdBuilder.isTestAd() is returning true after loading the ad. But on the screen am getting real ads.

  1. Is this expected in new admob?
  2. How can I differentiate test ad and real ad?

My code:

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

Firebase docs: https://firebase.google.com/docs/admob/android/targeting

Thank you

1
Hi. Can you link the Firebase docs and post in the codes you have? :) - AL.
I have the same problem on an old project which used to work as expected. I've already checked the device ID, the only way to show a test device is to use a Sample ad unit as described here. - manfcas

1 Answers

0
votes

I had the same issue. Type the DeviceId in uppercase. Worked for me.

You can differentiate test when you'll see a Test Ad label centered at the top of the ad.