Represents the version of a target or device.
A version is defined by an API level and an optional code name.
- Release versions of the Android platform are identified by their API level (integer), (technically the code name for release version is "REL" but this class will return
null instead.)
- Preview versions of the platform are identified by a code name. Their API level is usually set to the value of the previous platform.
While this class contains both values, its goal is to abstract them, so that code comparing 2+ versions doesn't have to deal with the logic of handle both values.
There are some cases where ones may want to access the values directly. This can be done with {@link #getApiLevel()} and {@link #getCodename()}.
For generic UI display of the API version, {@link #getApiString()} is to be used.