Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to tell at run-time what API level an Android device is running?

Tags:

android

Is there a way to get the API level used by a given Android device?

I want to make one version of an application that does not use AnticipateOvershootInterpolator() and another that uses it for devices using API levels greater than 3.

like image 359
weakwire Avatar asked Aug 26 '10 04:08

weakwire


1 Answers

Look at android.os.Build.VERSION.SDK (and android.os.Build.VERSION.SDK_INT for newer devices).

like image 68
CommonsWare Avatar answered Oct 16 '22 23:10

CommonsWare