belongs to Maven artifact androidx.core:core:1.0.0-alpha1

BuildCompat

public class BuildCompat
extends Object

java.lang.Object
   ↳ androidx.core.os.BuildCompat


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

Summary

Public methods

static boolean isAtLeastN()

This method is deprecated. Android N is a finalized release and this method is no longer necessary. It will be removed in a future release of the Support Library. Instead, use Build.SDK_INT >= Build.VERSION_CODES.N.

static boolean isAtLeastNMR1()

This method is deprecated. Android N MR1 is a finalized release and this method is no longer necessary. It will be removed in a future release of the Support Library. Instead, use Build.SDK_INT >= Build.VERSION_CODES.N_MR1.

static boolean isAtLeastO()

This method is deprecated. Android O is a finalized release and this method is no longer necessary. It will be removed in a future release of the Support Library. Instead use Build.SDK_INT >= Build.VERSION_CODES.O.

static boolean isAtLeastOMR1()

This method is deprecated. Android O MR1 is a finalized release and this method is no longer necessary. It will be removed in a future release of the Support Library. Instead, use Build.SDK_INT >= Build.VERSION_CODES.O_MR1.

static boolean isAtLeastP()

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

static boolean isAtLeastQ()

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

Inherited methods

Public methods

isAtLeastN

boolean isAtLeastN ()

This method is deprecated.
Android N is a finalized release and this method is no longer necessary. It will be removed in a future release of the Support Library. Instead, use Build.SDK_INT >= Build.VERSION_CODES.N.

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

Returns
boolean true if N APIs are available for use

isAtLeastNMR1

boolean isAtLeastNMR1 ()

This method is deprecated.
Android N MR1 is a finalized release and this method is no longer necessary. It will be removed in a future release of the Support Library. Instead, use Build.SDK_INT >= Build.VERSION_CODES.N_MR1.

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

Returns
boolean true if N MR1 APIs are available for use

isAtLeastO

boolean isAtLeastO ()

This method is deprecated.
Android O is a finalized release and this method is no longer necessary. It will be removed in a future release of the Support Library. Instead use Build.SDK_INT >= Build.VERSION_CODES.O.

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

Returns
boolean true if O APIs are available for use, false otherwise

isAtLeastOMR1

boolean isAtLeastOMR1 ()

This method is deprecated.
Android O MR1 is a finalized release and this method is no longer necessary. It will be removed in a future release of the Support Library. Instead, use Build.SDK_INT >= Build.VERSION_CODES.O_MR1.

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

Returns
boolean true if O MR1 APIs are available for use, false otherwise

isAtLeastP

boolean isAtLeastP ()

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

Returns
boolean true if P APIs are available for use, false otherwise

isAtLeastQ

boolean isAtLeastQ ()

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

Note: This method will return false on devices running release versions of Android. When Android Q is finalized for release, this method will be deprecated and all calls should be replaced with Build.SDK_INT >= Build.VERSION_CODES.Q.

Returns
boolean true if Q APIs are available for use, false otherwise