Pages Navigation Menu

Coding is much easier than you think

How to get android api version programmatically

There is different ways to get that programmatically .

First method .

The SDK level (integer) the phone is running is available in:


** UPDATE: Android Complete tutorial now available here.
The enum corresponding to this int is in the android.os.Build.VERSION_CODES class.

int currentapiVersion = android.os.Build.VERSION.SDK_INT;
if (currentapiVersion < = android.os.Build.VERSION_CODES.FROYO)
// Do something for froyo and above versions
// do something for phones running an SDK before froyo


About Gokul

I am very much interested in android and Wicket framework. A core android developer and working in android native app development and responsive web mobile design. I have also worked in wicket fame work and java web development. I will keep on updating you about android and wicket framework and answer your query.

%d bloggers like this: