0

Might be stupid question due to documentation mention that any API use that isn't supported by the device at runtime will throw an exception but I think worth trying ask, might be a solution for this.

I want to target minSDK 8 to say latest 16. But I see that animations have dramatically improved after 11. So, can I use animations for my project and run in previous SDK versions? This will crash the app or it just could ignore and not do what it supposed to do.

Should I take actions to overcome and say "run this cause device is supporting it"?

Thank you.

George Taskos
  • 8,324
  • 18
  • 82
  • 147

2 Answers2

4

http://nineoldandroids.com/ is a library for using the Honeycomb (Android 3.0) animation API on all versions of the platform back to 1.0. I think it should solve all your problems :)

Alexandru Cristescu
  • 3,898
  • 3
  • 19
  • 22
  • I think this should be more suitable to solve my problem. Looks good! Will get back soon as I release the project. Thank you. – George Taskos Dec 12 '12 at 21:45
1

You can't run api from SDK 11 in device with SDK 8. But you can branch your code with:

if (Build.VERSION.SDK_INT >= 11) { do that.. } else { do that }

The animation added in SDK 11 can be replaced with alternative animation API, which is backward compatible. You can take a look at Universal Tween Engine for a very simple and good alternative.

Amir Uval
  • 14,425
  • 4
  • 50
  • 74
  • 1
    The Universal Tween Engine is very generic, being able to animate any property of any object over time with any easing function. NineOldAndroids may be more specific to your needs, go for it – Amir Uval Dec 12 '12 at 21:55