Search code examples
androidsdkbackwards-compatibility

Android backward compatibility


Currently I am developing Android project for old sdk version. However - new SDK versions have been released and thinking to use new features in the UI.

If I want the application to run also on the old SDK devices, how can I make a single APK for all devices (for new SDK devices will use new features)? Is it possible? Or should I create different releases?

Example - ActionBar is on SDK ver. 3.0 and latest, if I will include it - then will not be able to run on SDK ver. 2.1, but I still want to support the users who have the oldest SDK versions.


Solution

  • The best approach is to use Android's compatibility library - http://developer.android.com/sdk/compatibility-library.html