Android Utililty Methods Device Version Check

List of utility methods to do Device Version Check

Description

The list of methods to do Device Version Check are organized into topic(s).

Method

booleanisHoneycomb()
is Honeycomb
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
booleanisICS()
is ICS
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
booleanisJellybean()
is Jellybean
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN;
booleanisKitKat()
is Kit Kat
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
booleanisKitKatOnly()
is Kit Kat Only
return Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT;
booleanisLollipop()
is Lollipop
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
booleanhasJellyBean()
Used to determine if the device is running Jelly Bean or greater
return Build.VERSION.SDK_INT >= 16;
booleanhasJellyBeanMR2()
Used to determine if the device is running Jelly Bean MR2 (Android 4.3) or greater
return Build.VERSION.SDK_INT >= 18;
StringgetAndroidVersion()
get Android Version
return Build.VERSION.RELEASE;
StringgetAndroidBuildSerial()
Returns the #android string.
Not guaranteed to be unique and not null, only available from API 9.
return android.os.Build.SERIAL;