Branched Code • Build.VERSION.SDK_INT if (Build.VERSION.SDK_INT >=9) // Run code only available on API 9+ • Android 2.2+ does not cause VerifyErrors if unavailable classes/methods are never run. Sunday, November 24, 13
Proxy Classes • Create a class that encapsulates switched code • Class uses either reflection or branching • Access class without caring about which version of Android you are running Sunday, November 24, 13
Android Support Library • Google provided library • Supports Fragments, LoaderManager, Notifications, Sharing • Includes classes not in vanilla Android (Pagers) • http://developer.android.com/tools/extras/ support-library.html Sunday, November 24, 13
NineOldAndroids • Backwards-compatible property animation library • All old animations aren't performant, but better than nothing. • http://nineoldandroids.com/ Sunday, November 24, 13
HoloEverywhere • Consistent theming across devices • https://github.com/Prototik/ HoloEverywhere • If you don't want a library, import from Android Open Source Project itself. Sunday, November 24, 13