Overnight Google has released the second developer preview for Android 11 to the world, announcing it on the Android Developers Blog. Starting off by a quick statement how they are all learning to adapt to these “current extraordinary times” they thanked the developer community for their feedback on the first developer preview.

The second developer preview for Android 11 brings a lot of bug fixes, as you would expect, and a few new items that seem essential now that we know what they are. The new DP2 also brings with it some new APIs that we will quickly unpack here.

New APIs

New APIs often, on the surface, seem like the boring part of a new update but if you remember that each new API brings with it new functionality that each and every developer out there can use to implement new features and functions within their apps then it seems much cooler.

There are four main new APIs which include a 5G state API which allows checking whether the users is connected to a 5G network which will allow the app to take advantage of “5G’s improved speeds and latency”.

Hinge Angle for foldables API is now a thing as well with Android 11 now supporting a hinge angle sensor that allows apps to check what angle the foldable device is folded to and change their app UI etc accordingly. This one seems useful, for the select few who own a foldable.

No one likes robocalls so Google are adding new APIs to give call-screening apps more abilities to “help users”. The new API also gives users the ability to mark a call as spam or adding to contacts. There isn’t much detail on this API just yet but Google have said they’ll follow up with more information “soon”.

Neural Networks is no longer a buzz word but now a way of life in so many apps that we do not notice it anymore. Google are bringing new “ops and controls” in the Neural Networks API. They are bringing functions to allow faster training time with higher accuracy along with more advanced machine learning models. With all this new AI and ML surely in the end our phones will do everything for us? Hail our new machine overlords.

Privacy and Security

Everyone loves more privacy and most more security (those with root access do not) and Google have added a couple of new types of ways to “ensure more accountability for specific use cases” within apps. Now there is also camera and microphone so that if an app wants to access camera or mic data from a foreground service this new value will need to be added to the manifest of the app — and you the user will be notified of it occurring.

Once again there are updates to the seemingly doomed scoped storage. Hopefully this one is better received than previous versions. The new updates bring “further improvements and changes” including support to migrate files from the legacy model to the new scoped storage model and better management of cached files — who here hasn’t cleared cache to get an app functioning again?

Polish and quality

There are the front end things that we users take for granted but love when implemented. There are now a new set of APIs to allow apps to synchronise with the phone’s keyboard creating a smoother “jank-free” keyboard transition. There are two ways for a developer to implement these new transitions, insets animation listener and WindowInsetsAnimationController, and the difference between the two can be seen below:

With the advent and popularity of various different screen refresh rates Google has added in the ability for games and apps to be able to set their preferred frame rates. With many devices supporting multiple frame rates on a single display the system will now use the app’s preferred frame rate as detailed in its API.

Resume on reboot is a new function that improves the OTA experience with apps able to access the Credential Encrypted (CE) storage without the user having to unlock the device after an OTA reboot. this means that apps can resume normal function and receive messages straight away.

There is now also camera support in the emulator allowing bot h front and rear camera to be displayed.

According to the timeline there will be one more Developer Preview from Google before the beta release in May. It will be interesting to see if they can stick to this timeline given the trying circumstances we find ourselves in at the moment.

If you want to check out the new Android 11 Developer Preview head on over to the download page where you can grab the factory image and install it from your bootloader. Beware though that is it not even beta and there may well be many bugs — there certainly was in DP1.