public static class Build.VERSION_CODES extends Object
Build.VERSION.SDK
. Version numbers
increment monotonically with each official platform release.Modifier and Type | Field and Description |
---|---|
static int |
BASE
October 2008: The original, first, version of Android.
|
static int |
BASE_1_1
February 2009: First Android update, officially called 1.1.
|
static int |
CUPCAKE
May 2009: Android 1.5.
|
static int |
CUR_DEVELOPMENT
Magic version number for a current development build, which has
not yet turned into an official release.
|
static int |
DONUT
September 2009: Android 1.6.
|
static int |
ECLAIR
November 2009: Android 2.0
Applications targeting this or a later release will get these
new changes in behavior:
The
Service.onStartCommand function will return the new
Service.START_STICKY behavior instead of the
old compatibility Service.START_STICKY_COMPATIBILITY . |
static int |
ECLAIR_0_1
December 2009: Android 2.0.1
|
static int |
ECLAIR_MR1
January 2010: Android 2.1
|
static int |
FROYO
June 2010: Android 2.2
|
static int |
GINGERBREAD
November 2010: Android 2.3
Applications targeting this or a later release will get these
new changes in behavior:
The application's notification icons will be shown on the new
dark status bar background, so must be visible in this situation.
|
static int |
GINGERBREAD_MR1
February 2011: Android 2.3.3.
|
static int |
HONEYCOMB
February 2011: Android 3.0.
|
static int |
HONEYCOMB_MR1
May 2011: Android 3.1.
|
static int |
HONEYCOMB_MR2
June 2011: Android 3.2.
|
static int |
ICE_CREAM_SANDWICH
October 2011: Android 4.0.
|
static int |
ICE_CREAM_SANDWICH_MR1
December 2011: Android 4.0.3.
|
static int |
JELLY_BEAN
June 2012: Android 4.1.
|
static int |
JELLY_BEAN_MR1
November 2012: Android 4.2, Moar jelly beans!
|
static int |
JELLY_BEAN_MR2
July 2013: Android 4.3, the revenge of the beans.
|
static int |
KITKAT
October 2013: Android 4.4, KitKat, another tasty treat.
|
static int |
KITKAT_WATCH
June 2014: Android 4.4W.
|
static int |
L
Temporary until we completely switch to
LOLLIPOP . |
static int |
LOLLIPOP
November 2014: Lollipop.
|
static int |
LOLLIPOP_MR1
March 2015: Lollipop with an extra sugar coating on the outside!
|
static int |
M
M is for Marshmallow!
|
static int |
N
N is for Nougat.
|
static int |
N_MR1
N MR1: Nougat++.
|
Constructor and Description |
---|
VERSION_CODES() |
public static final int CUR_DEVELOPMENT
public static final int BASE
public static final int BASE_1_1
public static final int CUPCAKE
public static final int DONUT
Applications targeting this or a later release will get these new changes in behavior:
android.Manifest.permission#WRITE_EXTERNAL_STORAGE
permission to be
able to modify the contents of the SD card. (Apps targeting
earlier versions will always request the permission.)
android.Manifest.permission#READ_PHONE_STATE
permission to be
able to be able to retrieve phone state info. (Apps targeting
earlier versions will always request the permission.)
TabHost
will use the new dark tab
background design.
public static final int ECLAIR
Applications targeting this or a later release will get these new changes in behavior:
Service.onStartCommand
function will return the new
Service.START_STICKY
behavior instead of the
old compatibility Service.START_STICKY_COMPATIBILITY
.
Activity
class will now execute back
key presses on the key up instead of key down, to be able to detect
canceled presses from virtual keys.
TabWidget
class will use a new color scheme
for tabs. In the new scheme, the foreground tab has a medium gray background
the background tabs have a dark gray background.
public static final int ECLAIR_0_1
public static final int ECLAIR_MR1
public static final int FROYO
public static final int GINGERBREAD
Applications targeting this or a later release will get these new changes in behavior:
public static final int GINGERBREAD_MR1
public static final int HONEYCOMB
Applications targeting this or a later release will get these new changes in behavior:
android.R.style#Theme_Holo
.
Activity
.
Activity.onPause()
method.
Context.getSharedPreferences()
will not automatically reload
the preferences if they have changed on storage, unless
Context.MODE_MULTI_PROCESS
is used.
ViewGroup.setMotionEventSplittingEnabled(boolean)
will default to true.
WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
is enabled by default on windows.
PopupWindow.isSplitTouchEnabled()
will return true by default.
GridView
and ListView
will use View.setActivated
for selected items if they do not implement Checkable
.
Scroller
will be constructed with
"flywheel" behavior enabled by default.
public static final int HONEYCOMB_MR1
public static final int HONEYCOMB_MR2
Update to Honeycomb MR1 to support 7 inch tablets, improve screen compatibility mode, etc.
As of this version, applications that don't say whether they
support XLARGE screens will be assumed to do so only if they target
HONEYCOMB
or later; it had been GINGERBREAD
or
later. Applications that don't support a screen size at least as
large as the current screen will provide the user with a UI to
switch them in to screen size compatibility mode.
This version introduces new screen size resource qualifiers
based on the screen size in dp: see
Configuration.screenWidthDp
,
Configuration.screenHeightDp
, and
Configuration.smallestScreenWidthDp
.
Supplying these in <supports-screens> as per
ApplicationInfo.requiresSmallestWidthDp
,
ApplicationInfo.compatibleWidthLimitDp
, and
ApplicationInfo.largestWidthLimitDp
is
preferred over the older screen size buckets and for older devices
the appropriate buckets will be inferred from them.
Applications targeting this or a later release will get these new changes in behavior:
New PackageManager.FEATURE_SCREEN_PORTRAIT
and PackageManager.FEATURE_SCREEN_LANDSCAPE
features were introduced in this release. Applications that target
previous platform versions are assumed to require both portrait and
landscape support in the device; when targeting Honeycomb MR1 or
greater the application is responsible for specifying any specific
orientation it requires.
AsyncTask
will use the serial executor
by default when calling AsyncTask.execute(Params...)
.
ActivityInfo.configChanges
will have the
ActivityInfo.CONFIG_SCREEN_SIZE
and
ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE
bits set; these need to be cleared for older applications because
some developers have done absolute comparisons against this value
instead of correctly masking the bits they are interested in.
public static final int ICE_CREAM_SANDWICH
Applications targeting this or a later release will get these new changes in behavior:
android:hardwareAccelerated
to turn it off if needed, although this is strongly discouraged since
it will result in poor performance on larger screen devices.
android.R.style#Theme_DeviceDefault
. This may be the
holo dark theme or a different dark theme defined by the specific device.
The android.R.style#Theme_Holo
family must not be modified
for a device to be considered compatible. Applications that explicitly
request a theme from the Holo family will be guaranteed that these themes
will not change character within the same platform version. Applications
that wish to blend in with the device should use a theme from the
android.R.style#Theme_DeviceDefault
family.
Context.bindService()
will not automatically add in Context.BIND_WAIVE_PRIORITY
.
AnimationSet
will parse out
the duration, fillBefore, fillAfter, repeatMode, and startOffset
XML attributes that are defined.
ActionBar.setHomeButtonEnabled()
is false by default.
public static final int ICE_CREAM_SANDWICH_MR1
public static final int JELLY_BEAN
Applications targeting this or a later release will get these new changes in behavior:
android.Manifest.permission#READ_CALL_LOG
and/or android.Manifest.permission#WRITE_CALL_LOG
permissions;
access to the call log is no longer implicitly provided through
android.Manifest.permission#READ_CONTACTS
and
android.Manifest.permission#WRITE_CONTACTS
.
RemoteViews
will throw an exception if
setting an onClick handler for views being generated by a
RemoteViewsService
for a collection container;
previously this just resulted in a warning log message.
ActionBar
policy for embedded tabs:
embedded tabs are now always stacked in the action bar when in portrait
mode, regardless of the size of the screen.
WebSettings.setAllowFileAccessFromFileURLs
and
WebSettings.setAllowUniversalAccessFromFileURLs
default to false.
PackageManager.setComponentEnabledSetting
will now throw an
IllegalArgumentException if the given component class name does not
exist in the application's manifest.
NfcAdapter.setNdefPushMessage
,
NfcAdapter.setNdefPushMessageCallback
and
NfcAdapter.setOnNdefPushCompleteCallback
will throw
IllegalStateException if called after the Activity has been destroyed.
android.Manifest.permission#BIND_ACCESSIBILITY_SERVICE
permission or
they will not be available for use.
AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS
must be set
for unimportant views to be included in queries.
public static final int JELLY_BEAN_MR1
Applications targeting this or a later release will get these new changes in behavior:
android:exported
is now
false
. See
the android:exported section in the provider documentation for more details.View.getLayoutDirection()
can return different values than View.LAYOUT_DIRECTION_LTR
based on the locale etc.
WebView.addJavascriptInterface
requires explicit annotations on methods
for them to be accessible from Javascript.
public static final int JELLY_BEAN_MR2
public static final int KITKAT
Applications targeting this or a later release will get these new changes in behavior:
PreferenceActivity.isValueFragment
becomes false instead of true.WebView
, apps targeting earlier versions will have
JS URLs evaluated directly and any result of the evaluation will not replace
the current page content. Apps targetting KITKAT or later that load a JS URL will
have the result of that URL replace the content of the current pageAlarmManager.set
becomes interpreted as
an inexact value, to give the system more flexibility in scheduling alarms.Context.getSharedPreferences
no longer allows a null name.RelativeLayout
changes to compute wrapped content
margins correctly.ActionBar
's window content overlay is allowed to be
drawn.android.Manifest.permission#READ_EXTERNAL_STORAGE
permission is now always enforced.android.Manifest.permission#READ_EXTERNAL_STORAGE
or
android.Manifest.permission#WRITE_EXTERNAL_STORAGE
permissions.public static final int KITKAT_WATCH
Applications targeting this or a later release will get these new changes in behavior:
AlertDialog
might not have a default background if the theme does
not specify one.public static final int L
LOLLIPOP
.public static final int LOLLIPOP
Applications targeting this or a later release will get these new changes in behavior:
Context.bindService
now
requires an explicit Intent, and will throw an exception if given an implicit
Intent.Notification.Builder
will
not have the colors of their various notification elements adjusted to better
match the new material design look.Message
will validate that a message is not currently
in use when it is recycled.Spinner
throws an exception if attaching an
adapter with more than one item type.LauncherApps
to correctly populate its
apps UI).Service.stopForeground
with removeNotification false will modify the still posted notification so that
it is no longer forced to be ongoing.DreamService
must require the
android.Manifest.permission#BIND_DREAM_SERVICE
permission to be usable.public static final int LOLLIPOP_MR1
public static final int M
Applications targeting this or a later release will get these new changes in behavior:
Activity.requestPermissions(java.lang.String[], int)
.AlarmManager.setTimeZone
will fail if
the given timezone is non-Olson.View
allows a number of behaviors that may break
existing apps: Canvas throws an exception if restore() is called too many times,
widgets may return a hint size when returning UNSPECIFIED measure specs, and it
will respect the attributes android.R.attr#foreground
,
android.R.attr#foregroundGravity
, android.R.attr#foregroundTint
, and
android.R.attr#foregroundTintMode
.MotionEvent.getButtonState
will no longer report MotionEvent.BUTTON_PRIMARY
and MotionEvent.BUTTON_SECONDARY
as synonyms for
MotionEvent.BUTTON_STYLUS_PRIMARY
and
MotionEvent.BUTTON_STYLUS_SECONDARY
.ScrollView
now respects the layout param margins
when measuring.public static final int N
Applications targeting this or a later release will get these new changes in behavior:
DownloadManager.Request.setAllowedNetworkTypes
will disable "allow over metered" when specifying only
DownloadManager.Request.NETWORK_WIFI
.DownloadManager
no longer allows access to raw
file paths.Notification.Builder.setShowWhen
must be called explicitly to have the time shown, and various other changes in
Notification.Builder
to how notifications
are shown.Context.MODE_WORLD_READABLE
and
Context.MODE_WORLD_WRITEABLE
are no longer supported.FileUriExposedException
will be thrown to applications.View.DRAG_FLAG_GLOBAL
.WebView.evaluateJavascript
will not persist state from an empty WebView.AnimatorSet
will not ignore calls to end() before
start().AlarmManager.cancel
will throw a NullPointerException if given a null operation.FragmentManager
will ensure fragments have been created
before being placed on the back stack.FragmentManager
restores fragments in
Fragment.onCreate
rather than after the
method returns.android.R.attr#resizeableActivity
defaults to true.AnimatedVectorDrawable
throws exceptions when
opening invalid VectorDrawable animations.ViewGroup.MarginLayoutParams
will no longer be dropped
when converting between some types of layout params (such as
LinearLayout.LayoutParams
to
RelativeLayout.LayoutParams
).DragEvent.ACTION_DRAG_ENTERED
event, when the drag shadow moves into
a descendant view that can accept the data, the view receives the
DragEvent.ACTION_DRAG_EXITED
event and won’t receive
DragEvent.ACTION_DRAG_LOCATION
and
DragEvent.ACTION_DROP
events while the drag shadow is within that
descendant view, even if the descendant view returns false
from its handler
for these events.public static final int N_MR1