Is there any AdMob dummy ids for testing purpose? Do I need to register app & get MY_AD_UNIT_ID?
-
What platform is this for? Android? – Siddharth Lele Sep 23 '12 at 16:15
-
You are making the call through an Activity or from XML? – Siddharth Lele Sep 23 '12 at 16:23
-
1here is appId 'ca-app-pub-3940256099942544~3347511713' – KamDroid Jul 07 '22 at 05:12
8 Answers
Banner:
ca-app-pub-3940256099942544/6300978111
Interstitial:
ca-app-pub-3940256099942544/1033173712
Rewarded Video:
ca-app-pub-3940256099942544/5224354917
Native Advanced:
ca-app-pub-3940256099942544/2247696110
Native Advanced Video:
ca-app-pub-3940256099942544/1044960115
Native Express Small/Large:
ca-app-pub-3940256099942544/2793859312
ca-app-pub-3940256099942544/2177258514

- 30,615
- 24
- 120
- 162
OS: Android
Mediation: Admob
For Banner Ads:
ca-app-pub-3940256099942544/6300978111
For Interstitial Ads:
ca-app-pub-3940256099942544/1033173712
For Admob NativeExpress Ads:
ca-app-pub-3940256099942544/1072772517
For Rewarded Video
ca-app-pub-3940256099942544/5224354917
Note:
The NativeExpressAd you'll see looks like a real one, but it's counted as a test ad. You're free to use that ad unit ID for your testing.
by Andrew Brogdon (Google Ads Team in one of his youtube comments)
All test Ads you can find in the actual admob github repository in the res > values > strings.xml

- 4,663
- 3
- 30
- 29
-
Hi Dinesh, Could you please help me with this. I've created an account and used my Unit ID but not getting any ad. – chetan Nov 16 '16 at 14:36
-
Could you open a new question and put a xml and java code of ad unit..And you can tag me there. – Dinesh Sunny Nov 17 '16 at 21:46
-
I've used NativeExpressAdView and using unit id of banner and it works fine. is this the proper solution? if not then i'll open a new question with code. Thanx. – chetan Nov 18 '16 at 06:52
-
also posted a new question here: http://stackoverflow.com/questions/40671219/nativeexpressadview-not-working-with-native-ad-unit-id-but-does-work-with-banner – chetan Nov 18 '16 at 07:06
-
And sample app id for tests : ca-app-pub-3940256099942544~3347511713

- 404
- 5
- 13
-
Why isnt this mentioned in the documentation of AdMob when they are telling us all about the dummy TestUnit Ids !?!? – user3833732 Jul 24 '23 at 16:32
There aren't dummy ID's per se. You need to setup the XML or the JAVA code to get test ads. To get Test Ads during testing, add the following to your XML where you have the AdView
declared.
NOTE: I use just the XML code to display Ads in my app.
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom|center"
android:orientation="horizontal" >
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="YOUR_AD_UNIT_ID"
ads:loadAdOnCreate="true"
ads:testDevices="TEST_EMULATOR, YOUR_DEVICE_ID" >
</com.google.ads.AdView>
</LinearLayout>
To set the Test Unit (Both the emulator and your devices) from JAVA:
AdRequest adRequest = new AdRequest();
adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
adRequest.addTestDevice("test");
To get your Device ID, you can use this:
final TelephonyManager tm = (TelephonyManager)getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
String deviceid = tm.getDeviceId();
From: https://stackoverflow.com/a/9681517/450534
EDIT: Missed your second question.
Yes. You will need to register your app in your Ad-Mob account. Without that being registered, you won't be getting your Ad Unit ID and therefore, no Ads in your app either.
UPDATE: Approximately two years after posting this answer, Google added a few dummy ID's to their admob SDK. Please refer to the other better voted answers for the dummy ID's

- 27,623
- 15
- 98
- 151
-
1this answer should be update, admob now offers dummy ids `ca-app-pub-3940256099942544/6300978111` – Lucem Aug 09 '18 at 18:56
Here is an official update from google
Android
- Banner:
ca-app-pub-3940256099942544/6300978111
- Interstitial :
ca-app-pub-3940256099942544/1033173712
- Reward Video:
ca-app-pub-3940256099942544/5224354917
- Native Advanced:
ca-app-pub-3940256099942544/2247696110
- Native Express (small):
ca-app-pub-3940256099942544/2793859312
- Native Express (large):
ca-app-pub-3940256099942544/2177258514
IOS
Banner:
ca-app-pub-3940256099942544/6300978111
Interstitial
ca-app-pub-3940256099942544/1033173712
Rewarded Video
ca-app-pub-3940256099942544/1712485313
Native Advanced
ca-app-pub-3940256099942544/2247696110
Native Express (Small):
ca-app-pub-3940256099942544/4270592515
Native Express(Large):
ca-app-pub-3940256099942544/8897359316
Read more:

- 417
- 6
- 16
For RewardedVideo
you can use the following one :
private static final String AD_UNIT_ID = "ca-app-pub-3940256099942544/5224354917";
private static final String APP_ID = "ca-app-pub-3940256099942544~3347511713";
how to use:
MobileAds.initialize(this, APP_ID);
mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(this);
mRewardedVideoAd.setRewardedVideoAdListener(this);
mRewardedVideoAd.loadAd(AD_UNIT_ID, new AdRequest.Builder().build());
for showing
if (mRewardedVideoAd.isLoaded()) {
mRewardedVideoAd.show();
}
Hope this will help many of us!

- 3,491
- 6
- 28
- 44
Sample adMob by google
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111">
</com.google.android.gms.ads.AdView>

- 132,869
- 46
- 340
- 423

- 386
- 5
- 16