Is there a way to get the api level ? eg. to an int. I want to make 1 version of an application but only use AnticipateOvershootInterpolator() to >3 Api level devices.
+2
A:
You can use this constant: android.os.Build.VERSION.SDK_INT
. It returns one of these values.
Cristian
2010-08-26 04:27:58
@Cristian: `SDK_INT` was added in Android 1.6 (API level 4). For apps only supporting that API level or higher, `SDK_INT` is a great answer. However, in this case, the OP is asking to detect ">3 Api level devices", suggesting support for API level 3. In that case, using the older `SDK` string and converting it to an integer is the better solution.
CommonsWare
2010-08-26 04:34:12
Yes... you are right. Thanks for the clarification!
Cristian
2010-08-26 12:01:30
+5
A:
Look at android.os.Build.VERSION.SDK
(and android.os.Build.SDK.VERSION.SDK_INT
for newer devices).
CommonsWare
2010-08-26 04:28:37