Android 11 — Developer focused updates [DP3]

Anoop M Madasseri
Tech Log
Published in
4 min readMay 9, 2020

This article will take you through the new Android 11 developer-focused features and APIs updates -

  • App exit reasons updates: Google updated the exit reasons API including the ActivityManager.getHistoricalProcessExitReasons() method, allowing developers to request details surrounding their app’s recent exits. Apps can exit for many reasons, including crashes. This update helps developers get a better understanding of their app’s stability and how to improve its performance.
  • Scoped storage enhancement: You can no longer use the ACTION_OPEN_DOCUMENT_TREE intent action to request access to the root directory of the internal storage volume, download directory, and to the root directory of each SD card. Apps that require broad access file can declare the MANAGE_EXTERNAL_STORAGE permission and use the ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION intent action to direct users to a system settings page where they can enable the Allow access to manage all files option for your app. With MANAGE_EXTERNAL_STORAGE permission, apps can read & write files in the shared storage and access the content of MediaStore.Files
  • ADB incremental installations: Installing large (2GB or larger) APKs using ADB can be a slow process. In Android 11, developers can load these APKs onto devices up to 10x faster thanks to incremental APK installations. It works by installing enough of the APK to launch the app while streaming the remaining data in the background. This is particularly useful for developers working on mobile games. It only works on Pixel 4 devices as of DP3, but handsets that launch with Android 11 will also tout this feature.
  • Wireless debugging improvements: Android 11 supports deploying and debugging your app wirelessly from your workstation via ADB. It allows the developers to connect multiple remote devices wirelessly using a pairing code, but Google plans to add QR code syncing in an upcoming Android Studio release.
  • Improved data access auditing: AppOpsManager.OnOpNotedCallback provides the insights to better identify and rectify potentially unexpected data access. Your app can register an instance of the callback to better understand how the app access user information.
  • Better support for curved/waterfall displays: DisplayCutout.getWaterfallInsets() to get exact dimensions of the waterfall inset to support waterfall displays, displays that wrap around the edge of the device. The existing DisplayCutout.getSafeInset…() methods now return the safe inset to avoid waterfall areas as well as cutouts.
  • Conversation improvements & Chat Bubbles: Improvements to enhance the way conversations are handled. Bubbles are now available to developers to help surface conversations across the system.
  • Large datasets secured sharing using data blobs: To help reduce data redundancy, both over the network and on disk, Android 11 caches shared datasets that support use cases such as machine learning and media playback. When your app needs access to a shared large dataset, it can first look for these cached datasets, called shared data blobs, before determining whether to download a new copy. The system maintains shared data blobs and controls which apps can access them using a BlobHandle object. Each instance of BlobHandle contains a cryptographically-secure hash and some identifying details for the dataset.
  • Synchronized IME transitions: WindowInsetsAnimation API that let’s sync your app’s content with the onscreen keyboard and system bars as they animate on and offscreen. This will hopefully allow devs to create more natural, intuitive, and “jank-free” IME transitions. To synchronize your app’s views with the appearance and disappearance of the IME, set a listener on a view by providing a WindowInsetsAnimation.Callback to View.setWindowInsetsAnimationCallback()
  • Variable refresh rate: In Android 11, apps and games can now set a preferred frame rate for each window. On devices with variable refresh rates, the system will now use the app’s preferred frame rate to choose the best refresh rate for the app. You can read more about this new Frame rate API here.
  • 5G state API: Developers can now quickly check whether a user is currently connected on a 5G New Radio or Non-Standalone network.
  • Call screening service improvements: New APIs to let call-screening apps do more to keep calls from bugging users. These apps will now be able to report a call rejection reason, as well as see if a call is being made to or from a number in the user’s contacts.
Android 11 release timeline

Read more in Features & APIs Overview section of Android Developer site: https://developer.android.com/preview/features

--

--

Tech Log
Tech Log

Published in Tech Log

Droid Log focuses on sharing the knowledge on what the community learns everyday about Android development

Anoop M Madasseri
Anoop M Madasseri

Written by Anoop M Madasseri

Nothing great ever came that easy.!!