BuildCompat

This class contains additional platform version checking methods for targeting pre-release versions of Android.

Types

Link copied to clipboard
annotation class PrereleaseSdkCheck

Experimental feature set for pre-release SDK checks.

Properties

Link copied to clipboard

The value of SdkExtensions.getExtensionVersion(AD_SERVICES). This is a convenience constant which provides the extension version in a similar style to Build.VERSION.SDK_INT.

Link copied to clipboard

The value of SdkExtensions.getExtensionVersion(R). This is a convenience constant which provides the extension version in a similar style to Build.VERSION.SDK_INT.

Link copied to clipboard

The value of SdkExtensions.getExtensionVersion(S). This is a convenience constant which provides the extension version in a similar style to Build.VERSION.SDK_INT.

Link copied to clipboard

The value of SdkExtensions.getExtensionVersion(TIRAMISU). This is a convenience constant which provides the extension version in a similar style to Build.VERSION.SDK_INT.

Functions

Link copied to clipboard

Checks if the device is running on the Android N release or newer.

Link copied to clipboard

Checks if the device is running on the Android N MR1 release or newer.

Link copied to clipboard

Checks if the device is running on a release version of Android O or newer.

Link copied to clipboard

Checks if the device is running on a release version of Android O MR1 or newer.

Link copied to clipboard

Checks if the device is running on a release version of Android P or newer.

Link copied to clipboard

Checks if the codename is a matching or higher version than the given build value.

Link copied to clipboard

Checks if the device is running on release version of Android Q or newer.

Link copied to clipboard

Checks if the device is running on release version of Android R or newer.

Link copied to clipboard
@ChecksSdkIntAtLeast(api = 31, codename = "S")
fun isAtLeastS(): Boolean

Checks if the device is running on a pre-release version of Android S or a release version of Android S or newer.

Link copied to clipboard
@ChecksSdkIntAtLeast(api = 32, codename = "Sv2")
fun isAtLeastSv2(): Boolean

Checks if the device is running on a pre-release version of Android Sv2 or a release version of Android Sv2 or newer.

Link copied to clipboard
@ChecksSdkIntAtLeast(api = 33, codename = "Tiramisu")
fun isAtLeastT(): Boolean

Checks if the device is running on a pre-release version of Android Tiramisu or a release version of Android Tiramisu or newer.

Link copied to clipboard
@ChecksSdkIntAtLeast(api = 34, codename = "UpsideDownCake")
fun isAtLeastU(): Boolean

Checks if the device is running on a pre-release version of Android UpsideDownCake or a release version of Android UpsideDownCake or newer.

Link copied to clipboard
@ChecksSdkIntAtLeast(api = 35, codename = "VanillaIceCream")
fun isAtLeastV(): Boolean

Checks if the device is running on a pre-release version of Android VanillaIceCream or a release version of Android VanillaIceCream or newer.