(6) When integrating AdMob ads into your application it is recommended to use test mode. In test mode test, ads are always returned.
Test mode is enabled on a per-device basis. To enable test mode for a device, first request an ad, then look in LogCat for a line like the following:
To get test ads on the emulator use AdManager.setTestDevices...
Once you have the device ID you can enable test mode by calling AdManager.setTestDevices:
AdManager.setTestDevices( new String[] {
AdManager.TEST_EMULATOR, // Android emulator
"E83D20734F72FB3108F104ABC0FFC738", // My T-Mobile G1 Test Phone
} );
Source: Android - Admob For Developers.
how can i get the device id
ReplyDeleteWatch the log with "adb logcat". The AdMobSDK outputs it for you.
ReplyDeletewhat version of the admob sdk? The latest, 4.0.4 doesn't require this, just use request.setTesting(true);
ReplyDeleteHow can I get the device ID in java code?
ReplyDeleteyou can get device id by dialing *#*#8255#*#*
ReplyDelete