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
Please login or Register to submit your answer

Log In

Not the answer you are looking for? Browse other questions tagged or ask your own question.