How to migrate an Android 2.2 application to higher versions - android

I have developed on Android application using sdk 2.2. Is it possible to migrate my application to higher version without re-coding. If yes, please let me know the procedure.

No, you don't have to recode it.
Just change in manifest file as,
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="14"
/>

Related

How to prevent Android app from running on specific Android API version?

We know that uses-sdk attributes in the manifest file can be set for filtering on Google Play:
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
and android:minSdkVersion can prevent app from installing on Android OS.
However android:maxSdkVersion is deprecated from Android 2.1 (API7), so it won't be recognized by Android OS anymore.
Then, what is the best way to set an upper limit of Android API version for running an app?

How to code for API 16 in Apache Cordova?

I have a problem with Apache Cordova.
My mobile phone is running Android 4.1.1.
And I wanted to test my future apps directly on my phone (not with the emulator).
But, Cordova always want the latest version (API 19) but I want API 16.
So, if you have any solutions, please tell it.
Best Reguards,
DJPOC
You will have a file named AndroidManifest.xml in the platforms/android directory.
In that file is markup similar to:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17" />
You can change these SDK versions to suit your needs.

How to work on latest sdk and support older ones

I need to suppoert api level 10, and working with latest sdk to provide new device features (only if sdk of device is new).
on manifest I choose min version 10.
The problem is that the application is not installed succesfully on the old sdk devices.
Whne I debug on those devices it works, The installation of signed aok fails.
Any suggestions?
Use this in your manifest file
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
If your application uses any API's that are not available on older Android versions, then you should try to use Support Libraries or just give up on those devices. If the application does run on older emulators in debug mode, then you can just change the minSdkVersion in the manifest to a lower one. Hope this helps.

Using Apache Cordova/PhoneGap with Android 2.x

It seems that it isn't possible to create a PhoneGap app for Android 2.x. Is that right?
For running android applications using phonegap build your application as Android 4.0.3 and set the minimum version to the lower version whatever you want. Basically Android 4.0.3 build does not affect the functionalities of the older android version. And this app perfectly works with android lower versions.
I usually do like this in manifest.xml
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>
Okay - so answering my own question. You need Android API mark 15 installed for PhoneGap to work.
But . . . you can change the AndroidManifest.xml file in the application to make it backwards compatible.
For example
<uses-sdk android:minSdkVersion="10" />
will be compatible with 2.3.3

How to stop ICS users from downloading my app

The app that I have in the store right now does not work quite right in ICS. While I fix it I would like to block users who have ICS from downloading and buying it. I emailed Google and they say that this is possible but they are vague about how to do it. I know how to put a Minimum SDK so that only people who have version x or above can download the app, but I cannot seem to locate how to do that in reverse. Is this possible?
Define android:maxSdkVersion in your manifest to restrict the upper limit.
For example:
<uses-sdk android:minSdkVersion="8" android:maxSdkVersion="10"/>
Now the app will only be available for devices running Froyo and Gingerbread versions of Android.
http://developer.android.com/guide/appendix/market-filters.html
You can set filters in the market. i.e. ICS user wont see your app ^^
Use android:maxSdkVersion="13" in your manifest
Check this page on the Android Developers documentation.
Just as you can set a minimum SDK version, you can set a maximum SDK version:
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
You can define a maxSdkVersion with the uses-sdk tag in the AndroidManifest.xml file. It is documented in the developers guide.
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />

Categories

Resources