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.
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.
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.
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.
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.
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.
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
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
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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# BuildCompat\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1 \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nBuildCompat\n===========\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\n\n\nclass\nBuildCompat\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|-----------------------------------|\n| java.lang.Object ||\n| ↳ | android.support.v4.os.BuildCompat |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis class contains additional platform version checking methods for targeting pre-release\nversions of Android.\n\nSummary\n-------\n\n| ### Public methods ||\n|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static boolean` | ` `[isAtLeastN](/reference/android/support/v4/os/BuildCompat#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 \u003e= Build.VERSION_CODES#N`.* |\n| ` static boolean` | ` `[isAtLeastNMR1](/reference/android/support/v4/os/BuildCompat#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 \u003e= Build.VERSION_CODES#N_MR1`.* |\n| ` static boolean` | ` `[isAtLeastO](/reference/android/support/v4/os/BuildCompat#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 \u003e= Build.VERSION_CODES#O`.* |\n| ` static boolean` | ` `[isAtLeastOMR1](/reference/android/support/v4/os/BuildCompat#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 \u003e= Build.VERSION_CODES#O_MR1`.* |\n| ` static boolean` | ` `[isAtLeastP](/reference/android/support/v4/os/BuildCompat#isAtLeastP())`() ` Checks if the device is running on a pre-release version of Android P or newer. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic methods\n--------------\n\n### isAtLeastN\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean isAtLeastN ()\n```\n\n\n**This method was deprecated\nin API level 26.1.0.** \n\nAndroid N is a finalized release and this method is no longer necessary. It will\nbe removed in a future release of the Support Library. Instead, use\n`Build.SDK_INT \u003e= Build.VERSION_CODES#N`.\n\nChecks if the device is running on the Android N release or newer.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|-----------------------------------------------|\n| `boolean` | `true` if N APIs are available for use \u003cbr /\u003e |\n\n### isAtLeastNMR1\n\nadded in [version 25.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean isAtLeastNMR1 ()\n```\n\n\n**This method was deprecated\nin API level 26.1.0.** \n\nAndroid N MR1 is a finalized release and this method is no longer necessary. It\nwill be removed in a future release of the Support Library. Instead, use\n`Build.SDK_INT \u003e= Build.VERSION_CODES#N_MR1`.\n\nChecks if the device is running on the Android N MR1 release or newer.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|---------------------------------------------------|\n| `boolean` | `true` if N MR1 APIs are available for use \u003cbr /\u003e |\n\n### isAtLeastO\n\nadded in [version 25.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean isAtLeastO ()\n```\n\n\n**This method was deprecated\nin API level 26.1.0.** \n\nAndroid O is a finalized release and this method is no longer necessary. It will\nbe removed in a future release of the Support Library. Instead use\n`Build.SDK_INT \u003e= Build.VERSION_CODES#O`.\n\nChecks if the device is running on a pre-release version of Android O or newer.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|------------------------------------------------------------------|\n| `boolean` | `true` if O APIs are available for use, `false` otherwise \u003cbr /\u003e |\n\n### isAtLeastOMR1\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean isAtLeastOMR1 ()\n```\n\n\n**This method was deprecated\nin API level 27.1.0.** \n\nAndroid O MR1 is a finalized release and this method is no longer necessary. It\nwill be removed in a future release of the Support Library. Instead, use\n`Build.SDK_INT \u003e= Build.VERSION_CODES#O_MR1`.\n\nChecks if the device is running on a pre-release version of Android O MR1 or newer.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|----------------------------------------------------------------------|\n| `boolean` | `true` if O MR1 APIs are available for use, `false` otherwise \u003cbr /\u003e |\n\n### isAtLeastP\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean isAtLeastP ()\n```\n\nChecks if the device is running on a pre-release version of Android P or newer.\n\n\n**Note:** This method will return `false` on devices running release\nversions of Android. When Android P is finalized for release, this method will be deprecated\nand all calls should be replaced with `Build.SDK_INT \u003e= Build.VERSION_CODES#P`.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|------------------------------------------------------------------|\n| `boolean` | `true` if P APIs are available for use, `false` otherwise \u003cbr /\u003e |\n\n-\n\n Interfaces\n ----------\n\n - [CancellationSignal.OnCancelListener](/reference/android/support/v4/os/CancellationSignal.OnCancelListener)\n - [ParcelableCompatCreatorCallbacks](/reference/android/support/v4/os/ParcelableCompatCreatorCallbacks)\n-\n\n Classes\n -------\n\n - [BuildCompat](/reference/android/support/v4/os/BuildCompat)\n - [CancellationSignal](/reference/android/support/v4/os/CancellationSignal)\n - [ConfigurationCompat](/reference/android/support/v4/os/ConfigurationCompat)\n - [EnvironmentCompat](/reference/android/support/v4/os/EnvironmentCompat)\n - [LocaleListCompat](/reference/android/support/v4/os/LocaleListCompat)\n - [ParcelableCompat](/reference/android/support/v4/os/ParcelableCompat)\n - [TraceCompat](/reference/android/support/v4/os/TraceCompat)\n - [UserManagerCompat](/reference/android/support/v4/os/UserManagerCompat)\n-\n\n Exceptions\n ----------\n\n - [OperationCanceledException](/reference/android/support/v4/os/OperationCanceledException)"]]