Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the significance of AdMob test device?

Tags:

android

admob

I could see there is some test id for testing the AdMob ads in Android devices. I know how to get the test id from log cat.

What is the difference in testing the ads in Android devices with the statement adRequest.addTestDevice("TEST_DEVICE_ID"); and without it? Because on both the scenarios I am able to get the ads without any problem.

The code:

AdRequest adRequest = new AdRequest();
adRequest.addTestDevice("TEST_DEVICE_ID");                
like image 878
iappmaker Avatar asked Jan 12 '23 11:01

iappmaker


1 Answers

"TEST_DEVICE_ID" is just a placeholder for your device unique ID.
It should be replaced with something like:

adRequest.addTestDevice("3E4409D3BCF2XXXXX5D87F53CD4XXXXX");  

To find your device ID: Run your app with adRequest.addTestDevice("TEST_DEVICE_ID"); in your code, this would print your device ID to the log. Search the logcat trace for an INFO message containing the text:

adRequest.addTestDevice  
like image 180
Gili Nachum Avatar answered Jan 21 '23 12:01

Gili Nachum