Skip to content

Instantly share code, notes, and snippets.

@fethica
Created December 28, 2013 23:04
Show Gist options
  • Select an option

  • Save fethica/8165352 to your computer and use it in GitHub Desktop.

Select an option

Save fethica/8165352 to your computer and use it in GitHub Desktop.
Retrieving Android API version programmatically.
int currentapiVersion = android.os.Build.VERSION.SDK_INT;
if (currentapiVersion >= android.os.Build.VERSION_CODES.FROYO){
// Do something for froyo and above versions
} else{
// do something for phones running an SDK before froyo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment