Reputation: 14077
Admob code can't see on device.
I followed the instructions here: http://www.admob.com/docs/AdMob_Android_SDK_Instructions.pdf
everything ok, but the 6. not clear for me
" Step 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
} ); }
"
What is that long number on the code? How do I get that number?
In the oncreate method I put this code:
AdManager.setTestDevices(new String[] { AdManager.TEST_EMULATOR } );
(into the help activity, not into the main activity)
Upvotes: 0
Views: 5215
Reputation: 1
You must search for something like
11-15 22:35:59.578: INFO/AdMobSDK(9775): To get test ads on this device use AdManager.setTestDevices( new String[] { "A32123456AA234567ABB12AA34BB3421234" } )
in the logcat. It's easier if you use the filter AdMobSDK
Upvotes: 0
Reputation: 26
Of course you must start the app on the real device to get a device id
Upvotes: 1
Reputation: 2070
Open the LogCat window, start app in the emulator. Then the number appear in that window
Upvotes: 2
Reputation: 2199
Step 6 is only to get the ads to show up in the emulator. They should still show up on the phone if you have done the other steps correctly.
I haven't ever done step six but it looks like you need to get your device id using the following function, http://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId()
Be sure to remove this when you want to publish though, if it's still in there you wont be making any money.
Hope that helps
Upvotes: 0