Reputation: 3800
I read a lot of documentation of adMob working on Android but I am still confused! adMob works only from 3.2 version? If yes, my app supports 2.2 (api 8), so if I change app properties to api 13 in order to allow adMob, does it means that my app will needs at least 3.2 devices?? If yes, how could I filter that if device <3.2, app will work without adMob, and if >=3.2, will integrate adMob?? Thank you
Upvotes: 0
Views: 1690
Reputation: 380
some people are confused about the minsdk, target sdk and the whole build target thing. Lets say you want to develop an app that works with ICS and also older versions, like SDK 10.
Your Manifest has to contain this:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="15" />
Then add the newest AdMob xxxx.jar file to the buildpath, don't add any old versions.
Add the AdMob activity
<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
Now it is time to setup the properties:
in project.properties set:
# Project target.
target=android-15
Right click your project
Click Android, On the right side you will see a list of available targets. In this case I selected 4.0.3 (15).
Your application will now work with Android 10 - Android 15. I tested this with a Nexus Ace (2.2), htc wildfire S (2.3.3) and a Galaxy Nexus (ICS) - worked fine so far.
Upvotes: 1
Reputation: 2065
Set your application target to 3.2 and in order to enable older devices to still run your app, go to your AndroidManifest.xml file and use:
<uses-sdk android:minSdkVersion="8" />
This will enable AdMob on all your desired devices.
Upvotes: 0
Reputation: 564
the API 13 requirement is just for the build process.
it's not the min sdk requirement, that's separate. I compile apps with AdMob and the ICS SDK version (API 16 I think?) but they still run in Donut, even with ads.
Upvotes: 0