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
Related
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.
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"
/>
I need to develop an android app with phonegap to support at least android v2.2.
Which cordova version supports minimum this one?
I cant really find this information anywhere on the site.
The Example App of PhoneGap 2.5.0 has minSDK=7 what is 2.1 <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>
see https://github.com/phonegap/phonegap/blob/2.5.0/lib/android/example/AndroidManifest.xml#L62
same is true for Cordova 2.5.0 :) <uses-sdk android:minSdkVersion="7" />
see https://github.com/apache/cordova-android/blob/master/test/AndroidManifest.xml#L48
so the latest should still support Android 2.2 ;)
The Cordova 2.6.0 accelerometer does not work in Android 2.2.1 (SDK level 8) on a real device. The watchAcceleration() callbacks are not invoked. Testing on the Android 4.2 emulator confirms my code works - the watchAcceleration() success callback is invoked. However, the emulator has limited (and incorrect) simulation of movement to exercise the accelerometer functionality.
This is probably very basic but I have failed to find information on how to do this. On iOS I have a base SDK and a target SDK so I can use the latest features from the base SDK (of course check if they are available first) and at the same time make my app run on devices with the target SDK. How can I do the same thing with Android in Eclipse, how can I compile with Android 4.1 and at the same time make my app run on (deploy to) Android 2.3?
Im not asking about checking which version I am running at run time, but how do I configure Eclipse correctly.
Thank you
Søren
Start by reading backward compability on Android developer site. You are probably looking for "Set Minimum and Target API levels".
On your Androidmanifest.xml check for the uses-sdk tag
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
version 8 is Android 2.2 up to 16 for 4.1/4.1.1
from here
I want to make application that support 2.1 or higher platforms. Does anyone have solution for it?
Can I use somekind of cross-platform for it or cross-platefroms are only for porting applications from differnt OS? Or there is any library i can use for this purpose?
Any application built with Android 2.1 API will work later versions of Android (theoretically). In the AndroidManifest.xml file, set the target SDK version to 2.1, and the 2.1 API will be loaded by Eclipse for the application. Done. It's still recommended to test it on later versions in case there's some slight variations that aren't documented, but most if not all things should work.
Just code your application and in your AndroidManifest put this somewhere <uses-sdk android:minSdkVersion="7" />.
That corresponds to Android 2.1, more details here http://developer.android.com/guide/appendix/api-levels.html