Android SDK Tutorial: Get AdMob Test Device ID

After about an hour of reading RTFM posts, text only posts and some Google searches I was able to get my Android device’s id to run test ads in my app with AdMob. I’ve documented everything here step by step, so I hope it saves you the time I lost.

Step 1:

Upload your app to the device

Step 2: Open LogCat

We are gonna need the logcat tool to see the ID.

Here’s how to open logCat

eclipse windows: show view and other

show view menu

in the "other" window select Android > LogCat then click OK

show view menu, select Android LogCat and click ok

show view menu, select Android LogCat and click ok

You are going to get a view with a lot of mess in it, this is the logcat view.

logcat eclipse view

logcat view

Step 3: Find The Device ID

RTFM…am just playing, am not the typical "help" forum an a-hole.

The best way to search through the mess that is logcat is to make a filter. Click the filter button, it look like a green plus sign and it’s right above the logcat tab.

Create filter button. It looks like a green plus sign.

Filter button. It looks like a green plus sign.

Now, name the filter "admob" or whatever you want. Type "Ads" in the by log tag text box, the letter "A" has to be capital.

log filter window.

log filter window. Put "Ads" in the by log tag window

A new tab called "admob" or whatever you called your filter should open in the LogCat tab. By doing this we have reduced all those lines in the LogCat tab to just a few. Look for the line that says "To get test ads on this device, call adRequest.addTestDevice("8848448sadsfa8ad8f8fda")".

admob filter tab inside LogCat

admob filter tab inside LogCat


Whatever string is in the addTestDevice function is your device’s id. Now go on and help others.