Question

My research shows that Android 2.2 & 2.3 have the loin share of the market. But when developing an app should I keep the API level of the app 2.1 or go with 2.2+?

What factors are usually taken into consideration?

Was it helpful?

Solution

I use 2.1 (API 7) as target, and 1.6 (API 4) as min version.

This covers most of the Android devices in use today.

If I need to use some (optional)functionality from 2.2 or 2.3 I use it with reflection.

Here is example:

    // try to override the transition animation
    if (VERSION.SDK_INT > android.os.Build.VERSION_CODES.DONUT) {
      try {
        Method method = getClass().getMethod("overridePendingTransition",
            new Class[]{int.class, int.class});
        method.invoke(this, 0, 0);
      } catch (Throwable e) {
        // can not override transition animation, so do nothing
      }
    }

OTHER TIPS

My answer is simple: start with SDK4 (Android 1.6), earlier versions lacks several important features (most notably screen sizes handling) and accumulates number unfixed bugs. Then check, if your app requires newer Android release features - like cloud-to-device notifications or barometer support.

Try not cutting out too much users at release date, Android Platform Stats will help you: http://developer.android.com/resources/dashboard/platform-versions.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top