For a couple lines of codes, I had to Google quite a bit to find all the answers I want to find.

First, a question related to warnings.  AdMobs requires that use a targetSdkVersion of at at least Android 3.2 (API 13).  But obviously I want my app to be usable to phones that uses much earlier versions of Android.

Now I’ll be honest that many young CS people/programmers and myself have a bad habit of ignoring warnings.  I recalled that some of the later classes do start to crack down on that and the TF/TA being to frown on that if shown. But I digressed.

So Googling that, the answer you’ll find is through birryree from stackoverflow:

You can safely ignore the warning.

So ignore it.  x_x  Yeah.

To be fair, as beekeeper chimed, it does mean a complicated app needs more extensive testing.  As one complies to a newer version of Android, if you one of the newer features, it won’t work on earlier versions.

—-

Speaking of Build Targets… How do one change Build Targets?  This is originally a drafted post, but I’ll just merge it here.

A simple change. Just a small issue encountered. How to change build target?

Right click on the project
Click on properties
Click Android
Choose the new Build Target!

Don’t forget to update the Android Manifest!

<uses-sdk android:minSdkVersion=”(Insert new build number here)” />

This could be useful when you want to use stuff that requires a different build target. I should read up more about it and its implications. Perhaps it would allow me to write a more interesting and comprehensive post.

—-

Another question is adding your device ID to the code so you can safely test (not accidentally be accused of clicking the ad yourself to get money) the app.

Several places give the advice of looking in logcat!  And you open logcat, connect the phone, and then what…

Fortunately, this guy gave a more detailed instructions on finding the Device ID.  The missing detail.

Pretty simple, but very useful to know.

—-

Finally last link up is toward the question of placing AdMob ads on the phone.  Unlike iPhone Development where it is pretty simple to place the object of where you want it to be on the screen, Android is a bit more tricky.  Google Code’s Developer’s Guide does a good enough job explain on putting the ads with some explanation to set some modifications (like targeting the audience and etc.)  However, I started to have the problem of setting the ad to the very bottom of the screen.  Pretty simple thing, but Googling multiple approaches and many was in XML rather than Java code.  Also I wanted to read if it is possible to do it in Linear Layout too.  In the end, I gave up and switch to XML with help of this answer (Don’t forget to type in android:layout_alignParentBottom=”true” or it will still not align)  with Java code to set target audience parameters.  Though now that I did it in XML, I think I understand enough to do it in Java. However, I’ll test that out after publishing the app and this post.