1 page.title=API Android 5.0 2 excludeFromSuggestions=true 3 sdk.platform.version=5.0 4 sdk.platform.apiLevel=21 5 @jd:body 6 7 8 <div id="qv-wrapper"> 9 <div id="qv"> 10 11 <h2> <a href="#" onclick="hideNestedItems('#toc44',this);return false;" class="header-toggle"> <span class="more"></span> <span class="less" style="display:none"></span></a></h2> 12 13 <ol id="toc44" class="hide-nested"> 14 <li><a href="#ApiLevel"> API</a></li> 15 <li><a href="#Behaviors"> </a> 16 <ol> 17 <li><a href="#ART"> Android (ART)...</a></li> 18 <li><a href="#BehaviorNotifications"> ...</a></li> 19 <li><a href="#BehaviorMediaControl"> RemoteControlClient...</a></li> 20 <li><a href="#BehaviorGetRecentTasks"> getRecentTasks()...</a></li> 21 <li><a href="#64BitSupport"> Android Native Development Kit (NDK)...</a></li> 22 <li><a href="#BindService"> ...</a></li> 23 <li><a href="#BehaviorWebView"> WebView...</a></li> 24 </ol> 25 </li> 26 <li><a href="#UI"> </a> 27 <ol> 28 <li><a href="#MaterialDesign">Material Design</a></li> 29 <li><a href="#Recents"> </a></li> 30 <li><a href="#WebView"> WebView</a></li> 31 <li><a href="#ScreenCapture"> </a></li> 32 </ol> 33 </li> 34 <li><a href="#Notifications"></a> 35 <ol> 36 <li><a href="#LockscreenNotifications"> </a></li> 37 <li><a href="#NotificationsMetadata"> </a></li> 38 </ol> 39 </li> 40 <li><a href="#Graphics"></a> 41 <ol> 42 <li><a href="#OpenGLES-3-1"> OpenGL ES 3.1</a></li> 43 <li><a href="#AndroidExtensionPack"> Android</a></li> 44 </ol> 45 </li> 46 <li><a href="#Media"></a> 47 <ol> 48 <li><a href="#Camera-v2">API </a></li> 49 <li><a href="#AudioPlayback"> </a></li> 50 <li><a href="#MediaPlaybackControl"> </a></li> 51 <li><a href="#MediaBrowsing"> </a></li> 52 </ol> 53 </li> 54 <li><a href="#Storage"> </a> 55 <ol> 56 <li><a href="#DirectorySelection"> </a></li> 57 </ol> 58 </li> 59 <li><a href="#Wireless"> </a> 60 <ol> 61 <li><a href="#Multinetwork"> </a></li> 62 <li><a href="#BluetoothBroadcasting"> Bluetooth</a></li> 63 <li><a href="#NFCEnhancements"> NFC</a></li> 64 </ol> 65 </li> 66 <li><a href="#Power">Project Volta</a> 67 <ol> 68 <li><a href="#JobScheduler"> </a></li> 69 <li><a href="#PowerMeasurementTools"> ( )</a> 70 </ol> 71 </li> 72 <li><a href="#Enterprise">Android </a> 73 <ol> 74 <li><a href="#ManagedProvisioning"> </a></li> 75 <li><a href="#DeviceOwner"> </a></li> 76 <li><a href="#ScreenPinning"> </a></li> 77 </ol> 78 </li> 79 <li><a href="#System"></a> 80 <ol> 81 <li><a href="#AppUsageStatistics"> </a></li> 82 </ol> 83 </li> 84 <li><a href="#Printing"> </a> 85 <ol> 86 <li><a href="#PDFRender"> PDF </a></li> 87 </ol> 88 </li> 89 <li><a href="#TestingA11y"> </a> 90 <ol> 91 <li><a href="#TestingA11yImprovements"> </a></li> 92 </ol> 93 </li> 94 <li><a href="#IME"> (IME)</a> 95 <ol> 96 <li><a href="#Switching"> </a></li> 97 </ol> 98 </li> 99 <li><a href="#Manifest"> </a> 100 <ol> 101 <li><a href="#ManifestFeatures"> </a></li> 102 <li><a href="#Permissions"> </a></li> 103 </ol> 104 </li> 105 </ol> 106 107 <h2>API Differences</h2> 108 <ol> 109 <li><a href="{@docRoot}sdk/api_diff/21/changes.html">API level 20 to 21 »</a> </li> 110 <li><a href="{@docRoot}sdk/api_diff/preview-21/changes.html">L Developer Preview to 21 »</a> </li> 111 </ol> 112 113 <h2>See Also</h2> 114 <ol> 115 <li><a href="{@docRoot}about/versions/android-5.0-changes.html">Android 5.0 Behavior Changes</a> </li> 116 <li><a href="{@docRoot}about/versions/lollipop.html">Android Lollipop Highlights</a> </li> 117 </ol> 118 119 </div> 120 </div> 121 122 <p> API: {@sdkPlatformApiLevel}</p> 123 124 <p> Android 5.0 (<a href="{@docRoot}reference/android/os/Build.VERSION_CODES.html#LOLLIPOP">Lollipop</a>) , . API.</p> 125 126 <p> , <a href="{@docRoot}about/versions/lollipop.html">Android Lollipop</a>.</p> 127 128 129 <h3 id="Start"> </h3> 130 131 <p> Android 5.0, <a href="{@docRoot}sdk/index.html">Android SDK</a>. <a href="{@docRoot}tools/help/sdk-manager.html"> SDK</a>, SDK Android 5.0 .</p> 132 133 134 <h3 id="ApiLevel"> API</h3> 135 136 <p> Android {@sdkPlatformVersion}, <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a> <code>"{@sdkPlatformApiLevel}"</code>, Android {@sdkPlatformVersion}, , .</p> 137 138 <p> API Android {@sdkPlatformVersion} . , API , <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>. , , <a href="{@docRoot}training/basics/supporting-devices/platforms.html"></a>.</p> 139 140 <p> API <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels"> </a>.</p> 141 142 <h2 id="Behaviors"> </h2> 143 144 <p> Android, , 5.0 .</p> 145 146 <h3 id="ART"> Android (ART)...</h3> 147 148 <p> 4.4 Android (ART). , Dalvik. Android 5.0 ART .</p> 149 150 <p> ART <a href="https://source.android.com/devices/tech/dalvik/art.html"></a>. :</p> 151 152 <ul> 153 <li> (AOT).</li> 154 <li> .</li> 155 <li> .</li> 156 </ul> 157 158 <p> Android ART. , Dalvik, . , <a href="{@docRoot}guide/practices/verifying-apps-art.html"> ART</a>. :</p> 159 160 <ul> 161 <li> Java Native Interface (JNI) C/C++.</li> 162 <li> , ( ).</li> 163 <li> , . ART , Android.</li> 164 </ul> 165 166 <h3 id="BehaviorNotifications"> ...</h3> 167 168 <p> Android 5.0. Android 5.0 <a href="{@docRoot}design/patterns/notifications.html"></a>. 169 </p> 170 171 <h4 id="NotificationsMaterialDesignStyle"> Material Design</h4> 172 <p> ( ) . . , . , :</p> 173 174 <ul> 175 <li> {@link android.app.Notification.Builder#setColor(int) setColor()}, . </li> 176 <li> , . - , . . , -.</li> 177 </ul> 178 179 <h4 id="NotificationsSoundVibration"> </h4> 180 <p> {@link android.media.Ringtone}, {@link android.media.MediaPlayer} {@link android.os.Vibrator}, . <em></em>. , {@link android.app.Notification.Builder}.</p> 181 182 <p> , {@link android.media.AudioManager#RINGER_MODE_SILENT RINGER_MODE_SILENT}. {@link android.media.AudioManager#RINGER_MODE_NORMAL RINGER_MODE_NORMAL} {@link android.media.AudioManager#RINGER_MODE_NORMAL RINGER_MODE_VIBRATE} .</p> 183 184 <p> Android {@link android.media.AudioManager#STREAM_MUSIC STREAM_MUSIC}. Android 5.0 {@link android.media.AudioManager#STREAM_RING STREAM_RING} {@link android.media.AudioManager#STREAM_NOTIFICATION STREAM_NOTIFICATION} , .</p> 185 186 <h4 id="NotificationsLockscreenVisibility"> </h4> 187 <p> Android 5.0 . . . , , {@link android.app.Notification.Builder#setPublicVersion(android.app.Notification) setPublicVersion()}.</p> 188 <p> , {@link android.app.Notification.Builder#setVisibility(int) setVisibility()} {@link android.app.Notification#VISIBILITY_PUBLIC VISIBILITY_PUBLIC}. 189 </p> 190 191 <h4 id="NotificationsMediaPlayback"> </h4> 192 <p> , {@link android.app.Notification.MediaStyle} {@link android.widget.RemoteViews.RemoteView}. , , {@link android.app.Notification#VISIBILITY_PUBLIC VISIBILITY_PUBLIC}. . , Android 5.0 {@link android.media.RemoteControlClient} . <a href="#BehaviorMediaControl"> RemoteControlClient</a>.</p> 193 194 <h4 id="NotificationsHeadsup"> </h4> 195 <p> , ( , ). . , . , .</p> 196 197 <p> :</p> 198 199 <ul> 200 <li> ( {@link android.app.Notification#fullScreenIntent}).</li> 201 <li> , .</li> 202 </ul> 203 204 <p> , , .</p> 205 206 <h3 id="BehaviorMediaControl"> RemoteControlClient...</h3> 207 <p> {@link android.media.RemoteControlClient} . API {@link android.media.session.MediaSession}.</p> 208 209 <p> Android 5.0 {@link android.media.session.MediaSession} {@link android.media.RemoteControlClient}. . , , .</p> 210 211 <p> Android 5.0 {@link android.app.Notification.MediaStyle}. {@link android.app.Notification.MediaStyle} , {@link android.app.Notification.Builder#addAction(int, java.lang.CharSequence, android.app.PendingIntent) Notification.Builder.addAction()}, . , , {@link android.app.Notification.MediaStyle#setMediaSession(android.media.session.MediaSession.Token) setSession()}.</p> 212 213 <p>, {@link android.app.Notification#VISIBILITY_PUBLIC VISIBILITY_PUBLIC} , . <a href="#LockscreenNotifications"></a>.</p> 214 215 <p> Android <a href="{@docRoot}tv/index.html">TV</a> <a href="{@docRoot}wear/index.html">Wear</a>, {@link android.media.session.MediaSession}. . Android, {@link android.media.session.MediaSession}.</p> 216 217 <h3 id="BehaviorGetRecentTasks"> getRecentTasks()...</h3> 218 219 <p> Android 5.0 <em> </em> (. <a href="#Recents"></a>). {@link android.app.ActivityManager#getRecentTasks ActivityManager.getRecentTasks()} . , - . , (, ). , {@link android.app.ActivityManager#getAppTasks() getAppTasks()}.</p> 220 221 <h3 id="64BitSupport"> Android Native Development Kit (NDK)...</h3> 222 223 <p>Android 5.0 32- 64- . 64- . OpenSSL . , API NDK , OpenGL ES (GLES) 3.1.</p> 224 225 <p> 64- Android 5.0, NDK 10c <a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>. NDK <a href="{@docRoot}tools/sdk/ndk/index.html#Revisions"> </a> 10.</p> 226 227 <h3 id="BindService"> ...</h3> 228 229 <p> {@link android.content.Context#bindService(android.content.Intent, android.content.ServiceConnection, int) Context.bindService()} {@link android.content.Intent}, . , {@link android.app.Service}. .</p> 230 231 <h3 id="BehaviorWebView"> WebView...</h3> 232 233 <p>Android 5.0 .</p> 234 <ul> 235 <li><strong> API 21 ...</strong> 236 <ul> 237 <li> <a href="https://developer.mozilla.org/en-US/docs/Security/MixedContent" class="external-link"> </a> cookie. , {@link android.webkit.WebSettings#setMixedContentMode(int) setMixedContentMode()} {@link android.webkit.CookieManager#setAcceptThirdPartyCookies(android.webkit.WebView, boolean) setAcceptThirdPartyCookies()}.</li> 238 <li> HTML- . . , {@link android.webkit.WebView#enableSlowWholeDocumentDraw()}.</li> 239 </ul> 240 </li> 241 <li><strong> API 21</strong>, cookie, .</li> 242 </ul> 243 244 <h2 id="UI"> </h2> 245 246 <h3 id="MaterialDesign">Material Design</h3> 247 248 <p> Android <em>Material Design</em>. . :</p> 249 250 <ul> 251 252 <li> Material;</li> 253 <li> ;</li> 254 <li> {@link android.support.v7.widget.RecyclerView};</li> 255 <li> ;</li> 256 <li> Material Design ;</li> 257 <li> ;</li> 258 <li> ;</li> 259 <li> XML.</li> 260 </ul> 261 262 <p> , , <a href="{@docRoot}training/material/index.html">Material Design</a>.</p> 263 264 <h3 id="Recents"> </h3> 265 266 <p> <a href="{@docRoot}guide/components/recents.html"> </a> . , . , . , -, , . {@link android.app.ActivityManager.AppTask}.</p> 267 268 <p> , , {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT} {@link android.app.Activity#startActivity(android.content.Intent) startActivity()}. <a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a> {@code documentLaunchMode} {@code "intoExisting"} {@code "always"} .</p> 269 270 <p> , , . <a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> {@link android.R.attr#maxRecents android:maxRecents}. 50 (25 ).</a></p> 271 272 <p> . <a href="{@docRoot}reference/android/R.attr.html#persistableMode">android:persistableMode</a>. , , . {@link android.app.Activity#setTaskDescription(android.app.ActivityManager.TaskDescription) setTaskDescription()}.</p> 273 274 <h3 id="WebView"> WebView</h3> 275 <p> Android 5.0 {@link android.webkit.WebView} Chromium M37. , . , {@link android.webkit.WebView}, Android 5.0 (37.0.0.0).</p> 276 277 <p> {@link android.webkit.PermissionRequest}, {@link android.webkit.WebView} , . API, <a href="https://developer.mozilla.org/en-US/docs/NavigatorUserMedia.getUserMedia" class="external-link">getUserMedia()</a>. Android . {@link android.webkit.WebView}.</p> 278 279 <p> <code><a href="{@docRoot}reference/android/webkit/WebChromeClient.html#onShowFileChooser(android.webkit.WebView, android.webkit.ValueCallback<android.net.Uri[]>, android.webkit.WebChromeClient.FileChooserParams)">onShowFileChooser()</a></code> {@link android.webkit.WebView} , ( . .) Android.</p> 280 281 <p> <a href="http://webaudio.github.io/web-audio-api/" class="external-link">WebAudio</a>, <a href="https://www.khronos.org/webgl/" class="external-link">WebGL</a> <a href="http://www.webrtc.org/" class="external-link">WebRTC</a>. <a href="https://developer.chrome.com/multidevice/webview/overview" class="external-link">WebView Android</a>.</p> 282 283 <h3 id="ScreenCapture"> </h3> 284 <p>Android 5.0 . API {@link android.media.projection}. , .</p> 285 286 <p> {@link android.media.projection.MediaProjection#createVirtualDisplay(java.lang.String, int, int, int, int, android.view.Surface, android.hardware.display.VirtualDisplay.Callback, android.os.Handler) createVirtualDisplay()} ( ) {@link android.view.Surface}, . API . , {@link android.content.Intent} {@link android.media.projection.MediaProjectionManager#createScreenCaptureIntent()}.</p> 287 288 <p>, API, (. {@code MediaProjectionDemo}).</p> 289 290 <h2 id="Notifications"></h2> 291 292 <h3 id="LockscreenNotifications"> </h3> 293 <p> Android 5.0 . , <em></em>.</p> 294 295 <p> , . {@link android.app.Notification.Builder#setVisibility(int) setVisibility()} :</p> 296 297 <ul> 298 <li>{@link android.app.Notification#VISIBILITY_PRIVATE VISIBILITY_PRIVATE}: , , .</li> 299 <li>{@link android.app.Notification#VISIBILITY_PUBLIC VISIBILITY_PUBLIC}: .</li> 300 <li>{@link android.app.Notification#VISIBILITY_SECRET VISIBILITY_SECRET}: , .</li> 301 </ul> 302 303 <p> {@link android.app.Notification#VISIBILITY_PRIVATE VISIBILITY_PRIVATE}, , . , SMS " 3 ", . , {@link android.app.Notification.Builder}. , {@link android.app.Notification.Builder#setPublicVersion(android.app.Notification) setPublicVersion()}.</p> 304 305 <h3 id="NotificationsMetadata"> </h3> 306 <p>Android 5.0 , , . {@link android.app.Notification.Builder} :</p> 307 308 <ul> 309 <li>{@link android.app.Notification.Builder#setCategory(java.lang.String) setCategory()}: , , <em></em> (, , ). 310 <li>{@link android.app.Notification.Builder#setPriority(int) setPriority()}: . {@link android.app.Notification#PRIORITY_MAX PRIORITY_MAX} {@link android.app.Notification#PRIORITY_HIGH PRIORITY_HIGH} , .</li> 311 <li>{@link android.app.Notification.Builder#addPerson(java.lang.String) addPerson()}: , . , .</li> 312 </ul> 313 314 <h2 id="Graphics"></h2> 315 316 <h3 id="OpenGLES-3-1"> OpenGL ES 3.1</h3> 317 <p>Android 5.0 Java OpenGL ES 3.1. OpenGL ES 3.1:</p> 318 319 <ul> 320 <li> ; 321 <li> ; 322 <li> ; 323 <li> ; 324 <li> ; 325 <li> ; 326 <li> OpenGL ES 2.0 3.0. 327 </ul> 328 329 <p> Java OpenGL ES 3.1 Android {@link android.opengl.GLES31}. OpenGL ES 3.1 , <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> {@code android:glEsVersion}. :</p> 330 331 <pre> 332 <manifest> 333 <uses-feature android:glEsVersion="0x00030001" /> 334 ... 335 </manifest> 336 </pre> 337 338 <p> OpenGL ES ( ), <a href="{@docRoot}guide/topics/graphics/opengl.html"> API</a>.</p> 339 340 <h3 id="AndroidExtensionPack"> Android</h3> 341 342 <p> OpenGL ES 3.1 Java . Android . ( {@code ANDROID_extension_pack_es31a} {@code #extension}.)</p> 343 344 <p> :</p> 345 346 <ul> 347 <li> , ( OpenGL ES 3.1 ).</li> 348 <li> .</li> 349 <li> ASTC (LDR).</li> 350 <li> .</li> 351 <li> .</li> 352 </ul> 353 354 <p> Java {@link android.opengl.GLES31Ext}. , . :</p> 355 356 <pre> 357 <manifest> 358 <uses-feature android:name=android.hardware.opengles.aep 359 android:required="true" /> 360 ... 361 </manifest> 362 </pre> 363 364 <h2 id="Media"></h2> 365 366 <h3 id="Camera-v2">API </h3> 367 368 <p>Android 5.0 API <a href="{@docRoot}reference/android/hardware/camera2/package-summary.html">android.hardware.camera2</a> . {@link android.hardware.camera2.CameraManager#getCameraIdList() getCameraIdList()} , {@link android.hardware.camera2.CameraManager#openCamera(java.lang.String, android.hardware.camera2.CameraDevice.StateCallback, android.os.Handler) openCamera()}. , {@link android.hardware.camera2.CameraCaptureSession} {@link android.view.Surface} . {@link android.hardware.camera2.CameraCaptureSession} .</p> 369 370 <p> , {@link android.hardware.camera2.CameraCaptureSession.CaptureCallback} . , {@link android.hardware.camera2.CameraCaptureSession.CaptureCallback} {@link android.hardware.camera2.CameraCaptureSession.CaptureCallback#onCaptureCompleted(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.TotalCaptureResult) onCaptureCompleted()} {@link android.hardware.camera2.CaptureResult}.</p> 371 372 <p> {@link android.hardware.camera2.CameraCharacteristics} , . {@link android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL INFO_SUPPORTED_HARDWARE_LEVEL} .</p> 373 374 <ul> 375 <li> {@link android.hardware.camera2.CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY}. API {@link android.hardware.Camera}.</li> 376 <li>, {@link android.hardware.camera2.CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL INFO_SUPPORTED_HARDWARE_LEVEL_FULL}, .</li> 377 </ul> 378 379 <p> API <a href="{@docRoot}reference/android/hardware/camera2/package-summary.html"></a> . {@code Camera2Basic} {@code Camera2Video} .</p> 380 381 <h3 id="AudioPlayback"> </h3> 382 <p> {@link android.media.AudioTrack}:</p> 383 <ul> 384 <li> ({@link android.media.AudioFormat#ENCODING_PCM_FLOAT ENCODING_PCM_FLOAT}). , . . . ( Android 5.0 .) 385 <li> {@link java.nio.ByteBuffer} , {@link android.media.MediaCodec}. 386 <li> {@link android.media.AudioTrack#WRITE_NON_BLOCKING WRITE_NON_BLOCKING} . 387 </ul> 388 389 <h3 id="MediaPlaybackControl"> </h3> 390 <p> API , , . {@link android.media.session.MediaSession} {@link android.media.session.MediaController} .</p> 391 392 <p> {@link android.media.session.MediaSession} {@link android.media.RemoteControlClient}. . Android <a href="{@docRoot}tv/index.html">TV</a> <a href="{@docRoot}wear/index.html">Wear</a>, {@link android.media.session.MediaSession} .</p> 393 394 <p> {@link android.media.session.MediaController} . . {@link android.media.session.MediaSession.Token}, {@link android.media.session.MediaSession}. {@link android.media.session.MediaController.TransportControls} , {@link android.media.session.MediaController.TransportControls#play() play()}, {@link android.media.session.MediaController.TransportControls#stop() stop()}, {@link android.media.session.MediaController.TransportControls#skipToNext() skipToNext()} {@link android.media.session.MediaController.TransportControls#setRating(android.media.Rating) setRating()} . {@link android.media.session.MediaController.Callback} .</p> 395 396 <p> , . {@link android.app.Notification.MediaStyle}.</p> 397 398 <h3 id="MediaBrowsing"> </h3> 399 <p> Android 5.0 API <a href="{@docRoot}reference/android/media/browse/package-summary.html">android.media.browse</a>. , {@link android.service.media.MediaBrowserService}. {@link android.service.media.MediaBrowserService} {@link android.media.session.MediaSession.Token}, , .</p> 400 <p> {@link android.media.browse.MediaBrowser} . {@link android.media.browse.MediaBrowser} {@link android.media.session.MediaSession}. {@link android.media.session.MediaSession.Token} .</p> 401 402 <h2 id="Storage"> </h2> 403 404 <h3 id="DirectorySelection"> </h3> 405 406 <p> Android 5.0 <a href="{@docRoot}guide/topics/providers/document-provider.html"> </a>, . / . .</p> 407 408 <p> , {@link android.content.Intent#ACTION_OPEN_DOCUMENT_TREE OPEN_DOCUMENT_TREE}. {@link android.provider.DocumentsProvider}, . . URI . , {@link android.provider.DocumentsContract#buildChildDocumentsUriUsingTree(android.net.Uri, java.lang.String) buildChildDocumentsUriUsingTree()}, {@link android.provider.DocumentsContract#buildDocumentUriUsingTree(android.net.Uri, java.lang.String) buildDocumentUriUsingTree()} {@link android.content.ContentResolver#query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String) query()}.</p> 409 410 <p> {@link android.provider.DocumentsContract#createDocument(android.content.ContentResolver, android.net.Uri, java.lang.String, java.lang.String) createDocument()} . {@link android.provider.DocumentsContract#renameDocument(android.content.ContentResolver, android.net.Uri, java.lang.String) renameDocument()} {@link android.provider.DocumentsProvider#deleteDocument(java.lang.String) deleteDocument()}. {@link android.provider.DocumentsContract.Document#COLUMN_FLAGS COLUMN_FLAGS} , .</p> 411 412 <p> {@link android.provider.DocumentsProvider} , , {@link android.provider.DocumentsProvider#isChildDocument(java.lang.String, java.lang.String) isChildDocument()} {@link android.provider.DocumentsContract.Root#FLAG_SUPPORTS_IS_CHILD FLAG_SUPPORTS_IS_CHILD} {@link android.provider.DocumentsContract.Root#COLUMN_FLAGS COLUMN_FLAGS}.</p> 413 414 <p> Android 5.0 . . {@link android.provider.MediaStore}. {@link android.content.Context#getExternalMediaDirs()} . {@link android.content.Context#getExternalFilesDir(java.lang.String) getExternalFilesDir()}, . , {@link android.media.MediaScannerConnection}.</p> 415 416 <h2 id="Wireless"> </h2> 417 418 <h3 id="Multinetwork"> </h3> 419 <p>Android 5.0 API . , . , , SUPL, MMS , .</p> 420 421 <p> , :</p> 422 423 <ol> 424 <li> {@link android.net.ConnectivityManager}.</li> 425 <li> {@link android.net.NetworkRequest.Builder} {@link android.net.NetworkRequest}, , .</li> 426 <li> , {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback) requestNetwork()} {@link android.net.ConnectivityManager#registerNetworkCallback(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback) registerNetworkCallback()} {@link android.net.NetworkRequest}, {@link android.net.ConnectivityManager.NetworkCallback}. , {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback) requestNetwork()}. , {@link android.net.ConnectivityManager#registerNetworkCallback(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback) registerNetworkCallback()}.</li> 427 </ol> 428 429 <p> {@link android.net.ConnectivityManager.NetworkCallback#onAvailable(android.net.Network) onAvailable()}. {@link android.net.Network} . .</p> 430 431 <h3 id="BluetoothBroadcasting"> Bluetooth</h3> 432 <p> Android 4.3 <a href="{@docRoot}guide/topics/connectivity/bluetooth-le.html"> Bluetooth</a> (<em>Bluetooth LE</em>) . Android 5.0 <em></em> Bluetooth . , . , , Bluetooth.</p> 433 <p> API {@link android.bluetooth.le} , , Bluetooth LE. , {@link android.Manifest.permission#BLUETOOTH_ADMIN BLUETOOTH_ADMIN}. Google Play, Bluetooth, , .</p> 434 435 <p> Bluetooth LE , {@link android.bluetooth.le.BluetoothLeAdvertiser#startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback) startAdvertising()} {@link android.bluetooth.le.AdvertiseCallback}. .</p> 436 437 <p> {@link android.bluetooth.le.ScanFilter}, Android 5.0, . Bluetooth LE, {@link android.bluetooth.le.BluetoothLeScanner#startScan(android.bluetooth.le.ScanCallback) startScan()} . {@link android.bluetooth.le.ScanCallback}, . </p> 438 439 <h3 id="NFCEnhancements"> NFC</h3> 440 <p> Android 5.0 NFC:</p> 441 442 <ul> 443 <li> <em></em> Android Beam.</li> 444 <li> Android Beam {@link android.nfc.NfcAdapter#invokeBeam(android.app.Activity) invokeBeam()}. NFC, .</li> 445 <li> {@link android.nfc.NdefRecord#createTextRecord(java.lang.String, java.lang.String) createTextRecord()} NDEF UTF-8.</li> 446 <li> NFC (AID), <code><a href="{@docRoot}reference/android/nfc/cardemulation/CardEmulation.html#registerAidsForService(android.content.ComponentName, java.lang.String, java.util.List<java.lang.String>)">registerAidsForService()</a></code>. {@link android.nfc.cardemulation.CardEmulation#setPreferredService(android.app.Activity, android.content.ComponentName) setPreferredService()}, , .</li> 447 </ul> 448 449 <h2 id="Power">Project Volta</h2> 450 451 <p> Android 5.0 . API .</p> 452 453 <h3 id="JobScheduler"> </h3> 454 <p> Android 5.0 API {@link android.app.job.JobScheduler}. , (, ). :</p> 455 <ul> 456 <li> , .</li> 457 <li> , .</li> 458 <li> , Wi-Fi.</li> 459 <li> , .</li> 460 461 </ul> 462 463 <p> {@link android.app.job.JobInfo}, .</p> 464 465 <p> , {@link android.app.job.JobInfo.Builder}. , :</p> 466 467 <ul> 468 <li> .</li> 469 <li> .</li> 470 <li> .</li> 471 <li> .</li> 472 </ul> 473 474 <p>, :</p> 475 476 <pre> 477 JobInfo uploadTask = new JobInfo.Builder(mJobId, 478 mServiceComponent /* JobService component */) 479 .setRequiredNetworkCapabilities(JobInfo.NetworkType.UNMETERED) 480 .build(); 481 JobScheduler jobScheduler = 482 (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE); 483 jobScheduler.schedule(uploadTask); 484 </pre> 485 486 <p> ( 2 , <a href="{@docRoot}reference/android/content/Intent.html#ACTION_BATTERY_OKAY"> </a>), , .</p> 487 488 <p> API {@link android.app.job.JobScheduler} . {@code JobSchedulerSample} .</p> 489 490 <h3 id="PowerMeasurementTools"> ( )</h3> 491 492 <p> {@code dumpsys batterystats} ( UID). :</p> 493 494 <ul> 495 <li> , . 496 <li> . 497 <li> . 498 <li> ( ). 499 <li> . 500 <li> . 501 </ul> 502 503 <p> , {@code --help}. , , : 504 <pre> 505 $ adb shell dumpsys batterystats --charged <package-name> 506 </pre> 507 508 <p> <a href="https://github.com/google/battery-historian" class="external-link">Battery Historian</a> {@code dumpsys}, HTML- , . , .</p> 509 510 <h2 id="Enterprise">Android </h2> 511 <h3 id="ManagedProvisioning"> </h3> 512 513 <p> Android 5.0 . <a href="{@docRoot}guide/topics/admin/device-admin.html"> </a> <em> </em> , . , , , .</p> 514 515 <p> , {@link android.app.admin.DevicePolicyManager#ACTION_PROVISION_MANAGED_PROFILE ACTION_PROVISION_MANAGED_PROFILE} {@link android.content.Intent}. {@link android.app.admin.DeviceAdminReceiver#onProfileProvisioningComplete(android.content.Context, android.content.Intent) onProfileProvisioningComplete()}. {@link android.app.admin.DevicePolicyManager#setProfileEnabled(android.content.ComponentName) setProfileEnabled()} .</p> 516 517 <p> . , {@link android.app.admin.DevicePolicyManager#enableSystemApp(android.content.ComponentName, android.content.Intent) enableSystemApp()}.</p> 518 519 <p> {@link android.content.pm.LauncherApps}, . . , {@link android.content.pm.PackageManager#getUserBadgedIcon(android.graphics.drawable.Drawable, android.os.UserHandle) getUserBadgedIcon()}.</p> 520 521 <p> . {@code BasicManagedProfile} .</p> 522 523 <h3 id="DeviceOwner"> </h3> 524 <p> Android 5.0 , . <em> </em> <a href="{@docRoot}guide/topics/admin/device-admin.html"> </a>, , . {@link android.app.admin.DevicePolicyManager} , . .</p> 525 526 <p> , NFC , . , , <a href="#ManagedProvisioning"> </a>.</p> 527 528 <h3 id="ScreenPinning"> </h3> 529 530 <p> Android 5.0 API . . , , , , -. , , .</p> 531 532 <p> :</p> 533 534 <ul> 535 <li><strong>.</strong> <em> > > </em> , . .</li> <li><strong>.</strong> {@link android.app.Activity#startLockTask() startLockTask()}, . , . {@link android.app.admin.DevicePolicyManager#setLockTaskPackages(android.content.ComponentName, java.lang.String[]) setLockTaskPackages()}, .</li> 536 </ul> 537 538 <p> , :</p> 539 540 <ul> 541 <li> , .</li> 542 <li> .</li> 543 <li> .</li> 544 <li> , .</li> 545 <li> , , {@link android.app.Activity#stopLockTask() stopLockTask()}.</li> 546 <li> , , "" "".</li> 547 548 </ul> 549 550 <h2 id="Printing"> </h2> 551 552 <h3 id="PDFRender"> PDF </h3> 553 <p> PDF- . {@link android.graphics.pdf.PdfRenderer}. {@link android.os.ParcelFileDescriptor} ( ). . {@link android.graphics.pdf.PdfRenderer#openPage(int) openPage()}, {@link android.graphics.pdf.PdfRenderer.Page#render(android.graphics.Bitmap, android.graphics.Rect, android.graphics.Matrix, int) render()}, {@link android.graphics.pdf.PdfRenderer.Page} . , (, <a href="http://en.wikipedia.org/wiki/Tiled_rendering" class="external-link"> </a> ).</p> 554 555 <p> API . {@code PdfRendererBasic}.</p> 556 557 <h2 id="System"></h2> 558 <h3 id="AppUsageStatistics"> </h3> 559 <p> API {@link android.app.usage} Android. , {@link android.app.ActivityManager#getRecentTasks(int, int) getRecentTasks()}. API, {@code "android.permission.PACKAGE_USAGE_STATS"} . <em> > > </em>.</p> 560 561 <p> , , . :</p> 562 563 <ul> 564 <li>: 7 .</li> 565 <li>: 1 .</li> 566 <li>: 6 .</li> 567 <li>: 2 .</li> 568 </ul> 569 570 <p> :</p> 571 <ul> 572 <li> .</li> 573 <li> (, , ).</li> 574 <li> , , ( ) .</li> 575 <li> , (, ).</li> 576 </ul> 577 578 <h2 id="TestingA11y"> </h2> 579 580 <h3 id="TestingA11yImprovements"> </h3> 581 <p> Android 5.0 :</p> 582 583 <ul> 584 <li> {@link android.app.UiAutomation#getWindowAnimationFrameStats() getWindowAnimationFrameStats()} {@link android.app.UiAutomation#getWindowContentFrameStats(int) getWindowContentFrameStats()} . , . .</li> 585 586 <li> {@link android.app.UiAutomation#executeShellCommand(java.lang.String) executeShellCommand()} . {@code adb shell} , . , {@code dumpsys}, {@code am}, {@code content} {@code pm}.</li> 587 588 <li> , API (, <a href="{@docRoot}tools/help/uiautomator/index.html">{@code UiAutomator}</a>), , . {@link android.view.accessibility.AccessibilityWindowInfo}, {@link android.accessibilityservice.AccessibilityService#getWindows() getWindows()}.</li> 589 590 <li> {@link android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction} , {@link android.view.accessibility.AccessibilityNodeInfo}. {@link android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction} API, , {@link android.view.accessibility.AccessibilityNodeInfo}.</li> 591 592 <li>Android 5.0 . {@link android.speech.tts.Voice} , , , .</li> 593 </ul> 594 595 <h2 id="IME"> (IME)</h2> 596 597 <h3 id="Switching"> </h3> 598 599 <p> Android 5.0 <a href="{@docRoot}guide/topics/text/creating-input-method.html"> </a>, . ( ) . {@link android.view.inputmethod.InputMethodManager#shouldOfferSwitchingToNextInputMethod(android.os.IBinder) shouldOfferSwitchingToNextInputMethod()}.</p> 600 601 <p> , , ( ). . {@link android.view.inputmethod.InputMethodManager#switchToNextInputMethod(android.os.IBinder, boolean) switchToNextInputMethod()}. 602 603 <p> API . . , , <a href="{@docRoot}guide/topics/text/creating-input-method.html"> </a>. 604 </p> 605 606 <h2 id="Manifest"> </h2> 607 608 <h3 id="ManifestFeatures"> </h3> 609 <p> <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> , , .</p> 610 611 <ul> 612 <li>{@link android.content.pm.PackageManager#FEATURE_AUDIO_OUTPUT}</li> 613 <li>{@link android.content.pm.PackageManager#FEATURE_CAMERA_CAPABILITY_MANUAL_POST_PROCESSING}</li> 614 <li>{@link android.content.pm.PackageManager#FEATURE_CAMERA_CAPABILITY_MANUAL_SENSOR}</li> 615 <li>{@link android.content.pm.PackageManager#FEATURE_CAMERA_CAPABILITY_RAW}</li> 616 <li>{@link android.content.pm.PackageManager#FEATURE_CAMERA_LEVEL_FULL}</li> 617 <li>{@link android.content.pm.PackageManager#FEATURE_GAMEPAD}</li> 618 <li>{@link android.content.pm.PackageManager#FEATURE_LIVE_TV}</li> 619 <li>{@link android.content.pm.PackageManager#FEATURE_MANAGED_USERS}</li> 620 <li>{@link android.content.pm.PackageManager#FEATURE_LEANBACK}</li> 621 <li>{@link android.content.pm.PackageManager#FEATURE_OPENGLES_EXTENSION_PACK}</li> 622 <li>{@link android.content.pm.PackageManager#FEATURE_SECURELY_REMOVES_USERS}</li> 623 <li>{@link android.content.pm.PackageManager#FEATURE_SENSOR_AMBIENT_TEMPERATURE}</li> 624 <li>{@link android.content.pm.PackageManager#FEATURE_SENSOR_HEART_RATE_ECG}</li> 625 <li>{@link android.content.pm.PackageManager#FEATURE_SENSOR_RELATIVE_HUMIDITY}</li> 626 <li>{@link android.content.pm.PackageManager#FEATURE_VERIFIED_BOOT}</li> 627 <li>{@link android.content.pm.PackageManager#FEATURE_WEBVIEW}</li> 628 </ul> 629 630 <h3 id="Permissions"> </h3> 631 632 <p> <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a> , API.</p> 633 634 <ul> 635 <li>{@link android.Manifest.permission#BIND_DREAM_SERVICE}: API 21 <a href="{@docRoot}about/versions/android-4.2.html#Daydream">Daydream</a>, .</li> 636 </ul> 637