check version code in android code example
Example: code for checking android build version
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q){
//do something
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q){
//do something
}