Getting device os version in Android programmatically

Something like these:

String myVersion = android.os.Build.VERSION.RELEASE; // e.g. myVersion := "1.6"
int sdkVersion = android.os.Build.VERSION.SDK_INT; // e.g. sdkVersion := 8; 

You can retrieve all SDK codes from Build.VERSION_CODES

Leave a Comment