views:

103

answers:

2

Hello!

Admob code cant 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 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)

A: 

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

Mike
how i can use real ads? not the test ads?
lacas
I believe you just have to comment out the stuff you added from step 6 before you publish your app. The test ads are for you to test it out without incurring some unauthorized activity on your account.
Mike
+1  A: 

Open the LogCat window, start app in the emulator. Then the number appear in that window

JoaquinG