views:

107

answers:

3

Hello, I've programmed my app with Eclipse and android 2.2. However I think that my app would work for previous version and so it would allow more users to use my app. The problem is that I'm not sure... for instance I'm using Gestures which I think is a more recent feature... but otherwise I'm just using some Button, ListView, and WebView.

So is there a way to detect automatically the Minimum Sdk Version needed ( by checking which function my app is using) ?

I can't download the SDK of each previous version of android and test it until it doesn't work ...

Thanks

A: 

To be totally sure you have to test your app against every platform version you target. Otherwise users of your app will do it for you (and that might be not good for app rating).

On the http://developer.android.com/intl/zh-TW/resources/dashboard/platform-versions.html page you can see the latest up-to-date platforms share info. So just decide how many potential users you're going to leave without your app :)

Konstantin Burov
Ok, which lowest platform do you advise to be compatible with ?I guess that almost nobody is under the version 1.5 right ?
Trox
See the update to answer :)
Konstantin Burov
Thanks a lot :) !
Trox
A: 

I can't download the SDK of each previous version of android and test it until it doesn't work ..

Why cant you? This is what the rest of us do. Create various different Emulators and test it out. I've released many apps by testing this way.

Donn Felker
Well it's very long and I must download the other platforms ( and with my connexion it will take hours and hours...). But I'll do it like that then. Thanks for your answer.
Trox
+1  A: 

Take a look at the Compatibility page on Android's developer website.

It has some great information on how to make sure your application will work on different versions of Android and how to stop users from downloading the application if they do not have the right features on their device. In your case that would be the gestures feature.

To manage this, Android defines feature IDs. Every capability has a corresponding feature ID defined by the Android platform. For instance, the feature ID for compass is “android.hardware.sensor.compass”, while the feature ID for Live Wallpapers is “android.software.live_wallpapers”. Each of these IDs also has a corresponding Java-language constant on the PackageManager class that you can use to query whether feature is supported at runtime.

Austyn Mahoney
Thanks, that's some really useful interesting information. But I'll still need to download the other platforms and test my app on them.
Trox
That is what needs to be done on almost every Android application that goes onto the market. You should get into the habit of testing your application on this different platforms anyways.
Austyn Mahoney