Admob testdevice ID

90 views
Skip to first unread message

begu...@gmail.com

unread,
Jan 13, 2018, 9:59:42 AM1/13/18
to Google Mobile Ads SDK Developers
Hi

I have an unusual problem in that I've created an app in android studio and a game in Unity both with admob ads. 

In order to test the app and game I have my mobile device set up with the testid.  The testid works and pulls test ads through with the app but with the game even though the implementation in code is exactly the same it seems to have pulled a real banner ad in when I run the app.  The code fflow is as follows in the app and game:

        MobileAds.Initialize(myGameID);
        request = new AdRequest.Builder()
        .AddTestDevice(mydeviceID)
        .Build();

       string adUnitId = myBannerAdLiveId;

        // Create a 320x50 banner at the top of the screen.
        bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.BottomLeft);

        // Load the banner with the request.
        bannerView.LoadAd(request);

Any ideas?  Ive directly copied the testdeviceid from the app to the game so it can't be incorrect.

mobileadssdk-a...@google.com

unread,
Jan 15, 2018, 12:58:01 AM1/15/18
to begu...@gmail.com, Google Mobile Ads SDK Developers
Hi,

Since you are also building the Unity game for Android, then the test device Id obtained from your Native Android app's console logs should also work with your Unity game. Make sure that you are testing on the same Android test device. 

To verify if the Banner Ads displaying in your Unity game is a Test Ad, you may check one of the following as per this guide.
  • You should be getting a log message similar to "This request is sent from a test device." in your Android logcat.
  • You will see a Test Ad label centered at the top of the Banner Ad
Regards,
Ivan Bautista
Mobile Ads SDK Team

mobileadssdk-a...@google.com

unread,
Jan 16, 2018, 12:38:04 AM1/16/18
to Gulfaran Younis, Google Mobile Ads SDK Developers
Hi Gulfaran,

Thanks for getting back to us and for doing extra effort to troubleshoot this.

You may refer in this guide on how to setup your test devices properly. Also, I noticed that in your screenshots, one of the Banner Ad has the Test Ad label while the other has no Test Ad label. I assume that the one with the Test Ad label is the native Android app while the other is the Unity game.

Once you capture another set of device logs, please check if you see the "This request is sent from a test device." log message. This log message is only thrown when an Ad was loaded from a Test Device, which will be treated as a Test Ad.

That said, I already raised this to the rest of the team as we received a similar report and I'll get back to you for any official feedback.

mobileadssdk-a...@google.com

unread,
Jan 19, 2018, 2:42:56 AM1/19/18
to Gulfaran Younis, Google Mobile Ads SDK Developers
Hi Gulfaran,

I just want to inform you that a fix is already in place for the missing "Test Ad" label. However, I can't guarantee any definite timelines on the release of the fix.

For the meantime, to check if you are indeed getting test ads when running on an enabled test device, you should see a log message similar to "This request is sent from a test device".
Reply all
Reply to author
Forward
0 new messages