Connect with us

Retrieve the android sdk version programmatically

android sdk version avaliable in android.os.Build.VERSION.SDK_INT library. To retrieve the android sdk version we need to check SDK_INT as below:

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){
    //lollipop and above versions
} else{
    //before lollipop

Your Answer

Please login or Register to submit your answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.

Log In

Subscribe to our newsletter

Enter your email address to subscribe to blog and receive notifications of new articles by email.
100% Privacy. No spam guaranteed