Modifier and Type | Field and Description |
---|---|
static String[] |
ACTIVE_CODENAMES |
static String |
BASE_OS
The base OS build the product is based on.
|
static String |
CODENAME
The current development codename, or the string "REL" if this is
a release build.
|
static String |
INCREMENTAL
The internal value used by the underlying source control to
represent this build.
|
static int |
PREVIEW_SDK_INT
The developer preview revision of a prerelease SDK.
|
static String |
RELEASE
The user-visible version string.
|
static int |
RESOURCES_SDK_INT
The SDK version to use when accessing resources.
|
static String |
SDK
Deprecated.
Use
SDK_INT to easily get this as an integer. |
static int |
SDK_INT
The user-visible SDK version of the framework; its possible
values are defined in
Build.VERSION_CODES . |
static String |
SECURITY_PATCH
The user-visible security patch level.
|
Constructor and Description |
---|
VERSION() |
public static final String INCREMENTAL
public static final String RELEASE
public static final String BASE_OS
public static final String SECURITY_PATCH
@Deprecated public static final String SDK
SDK_INT
to easily get this as an integer.SDK_INT
instead.public static final int SDK_INT
Build.VERSION_CODES
.public static final int PREVIEW_SDK_INT
0
on production platform builds/devices.
When this value is nonzero, any new API added since the last
officially published API level
is only guaranteed to be present
on that specific preview revision. For example, an API Activity.fooBar()
might be present in preview revision 1 but renamed or removed entirely in
preview revision 2, which may cause an app attempting to call it to crash
at runtime.
Experimental apps targeting preview APIs should check this value for
equality (==
) with the preview SDK revision they were built for
before using any prerelease platform APIs. Apps that detect a preview SDK revision
other than the specific one they expect should fall back to using APIs from
the previously published API level only to avoid unwanted runtime exceptions.
public static final String CODENAME
public static final String[] ACTIVE_CODENAMES
public static final int RESOURCES_SDK_INT