[Android] MobileAds.setTestMode

40 views
Skip to first unread message

itzno...@gmail.com

unread,
Jul 25, 2022, 3:38:34 AM7/25/22
to Google Mobile Ads SDK Developers
It's not feasible to add every testing device as a Test Device on dashboard & also via the identifier shown in logcat to be used in RequestConfiguration api.

Please add a static method like `MobileAds.setTestMode(boolean)` so we can use the build type as a boolean value to serve test or release ads.

Example: MobileAds.setTestMode(BuildConfig.DEBUG)

Mobile Ads SDK Forum Advisor

unread,
Jul 25, 2022, 11:14:22 AM7/25/22
to itzno...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for reaching out to us.

Before I raise this request to the team, can you confirm if you're referring to the "setTestMode" like the one available in custom events, but should be available in other ad formats?

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2d10rV:ref

itzno...@gmail.com

unread,
Jul 25, 2022, 11:22:14 AM7/25/22
to Google Mobile Ads SDK Developers
Kind of the same but at the SDK level as the example with custom events implements setTestMode on the SampleAdRequest.
What I'm suggesting is if the MobileAds.setTestMode is true, all the ad formats implemented in the app should show test ads.
Since we use a wide range of physical devices as well as emulators for testing, its a bit tedious to run the app once, record the test device identifier from logcat OR add the AD_ID to AdMob dashboard & then run the apps again.

Thanks.

Mobile Ads SDK Forum Advisor

unread,
Jul 25, 2022, 9:04:39 PM7/25/22
to itzno...@gmail.com, google-adm...@googlegroups.com
Hello,

Thank you for getting back to us.

As per your use case, we always recommend to use our demo ad units instead of adding all your device as test device on your AdMob's dashboard. This is also the recommend test approach while you're on testing / development stage.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2d10rV:ref

itzno...@gmail.com

unread,
Jul 26, 2022, 1:14:22 AM7/26/22
to Google Mobile Ads SDK Developers
Hi Teejay,
I’m aware of the Demo Ad Units.
But even those need to be used with a condition like:
val adUnitId = if (BuildConfig.DEBUG) demoAdUnit else productionAdUnit

Mobile Ads SDK Forum Advisor

unread,
Jul 26, 2022, 10:47:53 AM7/26/22
to itzno...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for your response.

Let me share this to the rest of the team and check if this can be added for Android SDK. You may keep an eye to our blog or release notes for any future updates on this.

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2d10rV:ref

itzno...@gmail.com

unread,
Sep 13, 2022, 5:04:26 AM9/13/22
to Google Mobile Ads SDK Developers
Any updates on this Feature Request?

Mobile Ads SDK Forum Advisor

unread,
Sep 13, 2022, 1:39:33 PM9/13/22
to itzno...@gmail.com, google-adm...@googlegroups.com

Hi DarShan,

 

Thank you for patiently waiting.

 

The team recommend to register each device in the AdMob UI. This only needs to be done once per device and covers all apps that serve ads from that account.

 

Regards,

Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2d10rV:ref
Reply all
Reply to author
Forward
0 new messages