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
|
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
|
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
|
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
|
static
boolean
|
isAtLeastP()
This method is deprecated.
Android P 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
|
static
boolean
|
isAtLeastQ()
This method is deprecated.
Android Q 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
|
static
boolean
|
isAtLeastR()
This method is deprecated.
Android R 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
|
static
boolean
|
isAtLeastS()
Checks if the device is running on a pre-release version of Android S or a release version of Android S or newer. |
Inherited methods | |
---|---|
Public methods
isAtLeastN
public 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.VERSION.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
public 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.VERSION.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
public 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.VERSION.SDK_INT >= Build.VERSION_CODES.O
.
Checks if the device is running on a release version of Android O or newer.
Returns | |
---|---|
boolean |
true if O APIs are available for use, false otherwise |
isAtLeastOMR1
public 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.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1
.
Checks if the device is running on a release version of Android O MR1 or newer.
Returns | |
---|---|
boolean |
true if O MR1 APIs are available for use, false otherwise |
isAtLeastP
public static boolean isAtLeastP ()
This method is deprecated.
Android P 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.VERSION.SDK_INT >= Build.VERSION_CODES.P
.
Checks if the device is running on a release version of Android P or newer.
Returns | |
---|---|
boolean |
true if P APIs are available for use, false otherwise |
isAtLeastQ
public static boolean isAtLeastQ ()
This method is deprecated.
Android Q 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.VERSION.SDK_INT >= Build.VERSION_CODES.Q
.
Checks if the device is running on release version of Android Q or newer.
Returns | |
---|---|
boolean |
true if Q APIs are available for use, false otherwise |
isAtLeastR
public static boolean isAtLeastR ()
This method is deprecated.
Android R 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.VERSION.SDK_INT >= Build.VERSION_CODES.R
.
Checks if the device is running on release version of Android R or newer.
Returns | |
---|---|
boolean |
true if R APIs are available for use, false otherwise |
isAtLeastS
public static boolean isAtLeastS ()
Checks if the device is running on a pre-release version of Android S or a release version of Android S or newer.
Note: When Android S is finalized for release, this method will be
deprecated and all calls should be replaced with Build.VERSION.SDK_INT >=
Build.VERSION_CODES.S
.
Returns | |
---|---|
boolean |
true if S APIs are available for use, false otherwise
|