public class SystemVersion extends Object
| 构造器 | 说明 |
|---|---|
SystemVersion() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static int |
getApiVersion() |
Obtains the API version number.
|
static int |
getBuildVersion() |
Obtains the build (B) version number, which increases with each new development build.
|
static int |
getFeatureVersion() |
Obtains the feature (F) version number, which increases with any planned new features.
|
static int |
getFirstApiVersion() |
Obtains the First API version number.
|
static int |
getMajorVersion() |
Obtains the major (M) version number, which increases with any updates to the overall architecture.
|
static String |
getOSFullName() |
Obtains the OS full name.
|
static String |
getReleaseType() |
Obtains the OS release type.
|
static int |
getSdkApiVersion() |
Obtains the SDK API version number.
|
static int |
getSeniorVersion() |
Obtains the senior (S) version number, which increases with any updates to the partial
architecture or major features.
|
static String |
getVersion() |
Obtains the version number represented by a string in the following format:
Major version number.Senior version number.Feature version number.Build version number.
|
public static String getVersion()
Leading zeros are not required even if the major, senior,
or feature version number is less than two digits,
or if the build version number is less than three digits.
If the OS release type obtained from getReleaseType() is not Release),
the version number is in the following format:
Major version number.Senior version number.Feature version number.Build version number Release type
public static int getMajorVersion()
The M version number monotonically increases from 1 to 99.
public static int getSeniorVersion()
The S version number monotonically increases from 0 to 99.
public static int getFeatureVersion()
The F version number monotonically increases from 0 or 1 to 99.
public static int getBuildVersion()
The B version number monotonically increases from 0 or 1 to 999.
public static String getReleaseType()
The OS release category can be Release, Beta, or Canary.
The specific release type may be Release, Beta1, or others alike.
public static int getApiVersion()
Mappings between versions and API versions:
Version API Version 1.0 1 1.1 2 2.0.0 3 2.1.0 4 2.1.1 5
public static int getSdkApiVersion()
Same as getApiVersion
public static int getFirstApiVersion()
Get the First API version
public static String getOSFullName()
Get the OS full name