belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
BuildCompat
public
class
BuildCompat
extends Object
java.lang.Object | |
↳ | android.support.v4.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 was deprecated
in API level 26.1.0.
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 was deprecated
in API level 26.1.0.
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 was deprecated
in API level 26.1.0.
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 was deprecated
in API level 27.1.0.
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()
Checks if the device is running on a pre-release version of Android P or newer. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public methods
isAtLeastN
boolean isAtLeastN ()
This method was deprecated
in API level 26.1.0.
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 was deprecated
in API level 26.1.0.
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 was deprecated
in API level 26.1.0.
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 was deprecated
in API level 27.1.0.
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.
Note: This method will return false
on devices running release
versions of Android. When Android P is finalized for release, this method will be deprecated
and all calls should be replaced with Build.SDK_INT >= Build.VERSION_CODES#P
.
Returns | |
---|---|
boolean |
true if P APIs are available for use, false otherwise
|