android Admob 6 few general questions - android

I am trying to integrate admob 6 with my app and having some issues-questions.
At first i couldnt make my app to compile with the new admob 6. I had
configchanges="keyboard|keyboardhidden|orientation"
logcat was complaining about missing attributes. so, configchanges became:
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
Then, I couldnt compile it! Cause i had my target build set for android 1.6. I managed to compile it by changing the target build to the latest sdk version i have installed: 4.0.3.
But here is the thing now, I cannot deploy my application to any emulator other than the one that has android 4.0.3 installed! To be specific, i have 5-6 emulators all with different android version and screen sizes for testing. I have emulator with android 1.6, 2.2, galaxy tab, android 4.0.3 etc...but now I can only see the android 4.0.3!
I want my app to be able to run on android 1.6 and older!
after reading a lot i saw :minsdkVersion and targetsdkversion.
minsdkversion is set to 4 and targetsdkversion to 12!
but still. I can only deploy to android 4.0.3 emulator.
what gives??
how can i test my app on previous versions????
any help please?

You can create different emulators to test different devices. As you have noticed you should set targetSDKVersion to 12 or more in order to compile. In order to accommodate older devices with older android version, you can set minSDKVersion to whatever you prefer.

solved by setting the emulator to manual selection.
evem though there is a red X it deploys.

Related

Android build target

I've been writing my first android app and so far have just been building against the highest android SDK available - 4.1. Up until this point I have only been testing on a physical device running 4.03 and everything seems to work fine.
I would like my min SDK level to be level 8 (2.2) and as far as I know I have not used anything from the APIs higher than this.
However if I build against 4.1 and run on a 2.2 emulator it just shows a white screen and no crash (OpenGL based so something going wrong with this). The same build runs fine on a 4.1 emu and my 4.03 device.
If I build against 2.2 with the exact same code it runs on the 2.2 emu fine.
I don't really know what could be causing this so any tips would be great. Do some classes get replaced in the newer APIs? If they were removed entirely I would assume it just wouldn't build at all against the new version.
Should I be setting my build target equal to my minimum? I am not using anything from the APIs higher than 2.2 currently but I was under the impression I should be building against the newest SDK available. Are there any negative effects of building for the lowest version for instance does it affect the look of the menus/dialogs?
Any help is appreciated, thanks.
You should build against the lowest SDK version you intend to be supported by your app (e.g., if you want to support users don't having the newest smart phones or tablets, building against the newest SDK version wouldn't be a good idea).
Generally, newer SDK versions only include additional classes and functions, but I am not 100% sure about any removed classes.
add this to your AndroidManifest.xml
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="15" />

android Admob configChanges

I'm using Admobsdk 4.3.1. When I built the program for android 2.3 it was working but I got an error message instead of the ads, requesting the following
ConfigChanges = keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize.
In order to compile I was forced to change target build from 2.3 to 3.2. I have also changed the minSdk to 2.3 and the program works on gingerbread like this. However I figure on a device using 2.3 it will be impossible to receive any ads.
So now I would like to switch to an older version of the admob jar. Does anyone know if this will work and where can I find an older version? On admob site there is only the latest one.
Thanks in advance.
Matt
AdMob SDK 4.3.1 requires the following config changes, and the following config changes require you to change the build target to 3.2 or higher. You can still use AdMob on any emulators or devices down to Android 1.5 by specifying:
<uses-sdk android:minSdkVersion="3" />
If your app only runs on Android 2.3 or higher, you would set minSdkVersion to 9. Note that the build target is only the version of Android used to compile your app. AdMob will run on lower versions of Android, just test to make sure that your app works fine on these lower versions as well.
Please see this blog post for more information about using 4.3.1.

Making AdMob work on Android 2.3 device?

Ok so I've read a lot of articles, questions and answers but still can't find one that works for me...
I'm trying to show an AdMob banner in an Android app.
I'm using Eclipse and the latest AdMob SDK (4.3.1), which requires Android 3.2 (13) to work.
Thing is, my test device is only 2.3.3 (10).
--
The best I've got so far is the app compiling against Android 2.3.3, running on the device, and a banner showing up but with this message: You must have AdActivity declared in AndroidManifest.xml with configChanges...
In this case, the configChanges attributes is set to "keyboard|keyboardHidden|orientation"
If I change it for the "full" version (with the addition of "|screenLayout|uiMode|screenSize|smallestScreenSize"), it doesn't compile anymore, as these params require Android 3.2.
--
I've read that it is possible to compile against Android SDK 13 while keeping 10 as the minSdkVersion. I've tried that, the configChanges attribute is now full and does not generate an error, but Eclipse now shows my device as not compatible with 3.2, and the app crashes if I run it anyway.
--
But obviously people seem to get AdMob working on older devices, no? So, how?
If AdMob 4.3.1 requires at least Android 3.2 no matter what, is there an older version that's compatible with 2.3?
I'm really confused here...
Thanks to anyone who will be able to shed some light on this.
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation">
</activity>
works for me with admob 4.1.1, haven't tried 4.3.1 yet.
Set `android:targetSdkVersion to 13 and android:minSdkVersion to 3 then the adMob will run on all devices equal and greater than 1.5

How do I emulate a HoneyComb-compatible app on older emulators?

I began the process of making one of my apps Honeycomb-friendly.
I started by changing the project's target build to version 11, and edited to AndroidManifest.xml to use:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="11" />
These are the only changes I made so far. I am able to test it perfectly on my Honeycomb tablet device.
However, I cannot get Eclipse to launch this app in an older emulator (e.g. version 9). Technically speaking, the app should run in older android versions, so what can I do to test this app for older devices?
Or am I doing something else wrong?
I'm by no means an expert on this front but setting the minSdkVersion different from the targetSdkVersion doesn't make the app automatically use a different API level based on the device. See this:
Android Min SDK Version vs. Target SDK Version
and this:
http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html
I suspect that because your application is using level 11 apis it won't run on a device that is of a previous API level.
This seems to be some sort of bug. When my 3.1 device is plugged into my PC, Eclipse/Android won't let me launch a new emulator that's < 3.0.
I worked around this by launching the emulator before I plug in my device, and then it has no problems deploying the app to both of the running devices.

What happens if we use/install 2.3 build in 2.2 device

I am working on application which should go into android 2.2(Froyo) and android 2.3(GingerBread) devices.
I have built application with android 2.3 SDK , and Installed the same application in 2.2(Froyo) and 2.3 (Ginger Bread) devices.
In both the devices application installed successfully and it is working properly.
I want to know if we install the higher version build into lower version devices is there any chances to face problems.
Till now I didn't found any issue with this.
I didn't used the MIN:SDK version field in the Manifest file.
If you want only users from version 2.2 and up to download your app, just make sure your minimum SDK version is 2.2 by putting this line in your AndroidManifest.xml:
<uses-sdk android:minSdkVersion="8" />
If you want an upper bound limit as well, you can add:
android:maxSdkVersion="10"
So users with Android SDK version 2.2 up to 2.3.3 will be able to install your app.
Regarding problems: If you're using a specific SDK API then just make sure to add an if clause around it to make sure you're on the right version. The best thing to do is change the target to 2.2 just to see if you have any compilation errors... Then you'd know what to change.
Then just fix the problems, change back to 2.3 and build.
If you don't specify the minimum sdk attribute in the manifest file users with 2.2 won't see your application on the market. It specifies that your application supports 2.2 so that users can see the app on the market.
Make sure any functionality that you use from 2.3 has an alternative functionality so that 2.2 users have the ability to actually use your application.
yes , u can find problem ,
try to install that app on android 1.6
it's about API version , there will be some APIs in your app doesn't supported in a lower API version

Categories

Resources