I found Android has SDK version 1.5, 1.6, 2.2, 3.1.. all these versions are combination of . and numeric digits. But when i found SDK version 2.1-update1 in this case the version code is contains alphabets also (update1). Why is it like that?
I found Android has SDK version 1.5, 1.6, 2.2, 3.1.. all these versions are
Share
Here is the version information available from Build.VERSION, from most interesting to least:
VERSION.SDK_INT is the “SDK version” or “API version”. This is the number that accurately represents the APIs available on the platform you are running on; it is the number for example that you see in the documentation for filtering our newer APIs. The possible values are described at http://developer.android.com/reference/android/os/Build.VERSION_CODES.html and it is a monotonically increasing number so if you want to know whether some APIs introduced at API level N are available, you can do this with “if (Build.VERSION.SDK_INT >= N)”.
VERSION.SDK is the original representation of the SDK version, but as a string which is not nearly as convenient for applications to use so deprecated. If you really need to run on older versions of the platform prior to SDK_INT, then you can get the same number with “Integer.parseInt(Build.VERSION.SDK)”; you can see that these are the same thing by seeing how they are initialized in the source code https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/Build.java
VERSION.RELEASE is the string that is shown to the user to tell them the platform version. This is not intended to be parsed by applications. This is where you will find things like “3.1” or “2.1-update1”. Again, this is for display to the user; you should not be trying to interpret it in your code. It tells the user the actual core version of the platform their device is running.
VERSION.INCREMENTAL is an arbitrary string tagging the actual software build of the device. The format of this string varies between manufacturers. It is also for display to the user, though less meaningful for them — it is only useful if they want to know if their software is a particular build number they are looking for.