Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check android version in a condition
// Check the condition as
if (android.os.Build.VERSION.SDK_INT>=11){
//Do something
}
// This is better
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
//Do something
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment