New Features of Android P




Six months ago Google released Android 8.1 for its branded devices like Pixel or Nexus. Last month we got an update for Android 8.0 from major smart devices vendors like Samsung. So as we can see, the full enrollment of the Oreo hasn’t been implemented yet. However, developer preview of Android P was released last Wednesday. So, now we have the first preview of the new Google’s child - Android P. The first developers’ preview is now live so we have decided to review the improvements and features that provides and creates short list of the coolest ones. Check out what Android P hides under the hood!


UI and UX improvements


The new preview introduces a bunch of UI improvements like the DisplayCutout feature. It allows the programmers to find non functional areas on the screen and handle them properly. From now you will be able to locate an area, determine its shape and decompose UI elements to lay out the content around it. For easier management of the elements around dead areas, the Preview introduces a new layout param - layoutInDisplayCutoutMode with a set of attributes. The preview also provides new developers feature that allows to simulate the Cutout areas on your device or emulator. This feature is provided to improve applications running on devices with screen design similar to the notch from iPhone X.
The second thing related to UI improvements is a set of notifications enhancements. Developers now have new tools to improve notification related to Messaging. You can identify participants of the conversation better thanks to the Notification.Person class. P also introduces support of images, smart replays or retrieving message draft from notification input. Also, the new preview provides new tools for managing the notification channels. The main changes are included in the NotificationManager.Policy for Do not disturb mode.
Third feature related to UI is new class called AnimatedImageDrawable. Class is responsible for rendering animated images based on GIF and WebP formats. AnimatedImageDrawable is using RenderThread to animate the images so it should not affect your app UI performance. It also uses worker thread for decoding images to keep all tasks away from UI thread. New API also introduces new approach for decoding images like Drawables and Bitmaps. This new approach was introduced in the tools called ImageDecoderthat should replace classes like BitmapFactory or ImageDecoder. Apart from typical features like creating images, decoding or resizing you can now crop the images or use complicated effects like round corners or set a circle mask even for animated drawables.

New media features

Android P also adds new features and tools for handling media inside apps much better. The first feature is MediaPlayer2 for displaying video and audio. Thanks to the DataSourceDesc MediaPlayer2 supports the playlists. The P also introduces new HDR profile - High Dynamic Range (HDR) VP9 Profile 2. New profile allows to deliver HDR-enabled movies. From now you can also use Media metrics from AudioTrackAudioRecord and MediaDrm classes.
Android P introduces Multi-camera support as well. It means that developers can now access streams from two cameras simultaneously. It is possible thanks to camera device which is a logical representation of the two or more physical cameras. You can also reduce delays during initial capture, and Surface sharing thanks to the SessionConfiguration class. Android P also introduces support for external cameras (via USB).

RTT API and Indoor navigation

Most interesting update that has been introduced in the latest Android developer preview is RTT API - it allows to navigate inside of the buildings. Android P supports new Wi-Fi standard 802.11mc aka Wi-Fi RTT (Round Trip Time). Thanks to such a standard we are now able to navigate inside of the buildings. Navigation is estimated according to the delays of the packets between the nearest access point that supports RTT Wi-Fi and a device. Thanks to this technology you can get navigation that is accurate up to 1 meter. Android P provides dedicated RTT APIs that allow you to use the indoor navigation in your app. This feature looks really promising, especially when combined to AR. Unfortunately, because of the low adoption of 802.11mc we need to wait until this feature becomes more popular.

Security updates


In the case of each update, the most important issues are Security updates. Android P introduces few features that allow developers to increase security. The first of the described ones is unified fingerprint authentication dialog represented by the class called FingerprintDialog. You can now use dialog with unified look that improves user’s experience and gains user’s trust. Such a purpose takes ConfirmationDialog which was designed to confirm the short statement by the user. You can display this dialog for user to allow him to confirm sensitive action (e.g. payment transaction) and get hash-based cryptographic signature of the statement. The signature is, for sure, produced using KeyStore API and Trusted Execution Environment.

New implementation of hardware-backed keystore

Android P introduces completely new implementation of the Keymaster HAL module which is responsible for providing hardware backed functions for Android Keystore. New implementation of the Keymaster HAL is called StrongBox Keymaster and improves most crucial features related to the Android cryptography. Strongbox keymaster is a module that allows the implementation of dedicated CPU, key storage and random-number generator.
New implementation of the Keymaster introduces a set of cryptographic standards to fulfill the low-power StrongBox. Such a set contains of following algorithms with corresponding key lengths:
  • RSA - 2048
  • AES - 128 and 256
  • ECDSA - P-256
  • HMAC-SHA256 - 8B - 64B, inclusive
  • Triple DES - 168

Secure key wrapper

P provides us with the new wrapper for Secret keys. It provides additional security features that can protect encryption keys from plaintext handling in the memory. Now, you can import keys into the keystore in which they will be wrapped into safe ASN.1 format as an additional protection.

Encrypted backups

The last of the most interesting security features is client-side encrypted backup. You can now use app data backup with additional encryption on client’s side based on user’s password.

Popular posts from this blog

Introducing our New App: Ghost Sound Analyzer! (1/2)

Introducing our New App: Video 2 Foto Changer. (2/2)

Introducing our New App: Live Wallpaper!