Google has released the second Android 11 developer preview. Among other things, the innovations aim again at the 5G connection and new device types. The privacy settings have new guidelines for the camera and the microphone. In addition, games in particular can now specify a desired refresh rate beyond 60 Hz.
As the name indicates, the preview is aimed at developers who want to prepare their apps for the upcoming version of Google's mobile operating system. The current release still has no beta status: According to current planning, the beta phase should start in May, and the final release is planned for the third quarter.
New for 5G and foldables
The first Android 11 developer preview published in February already had some functions on board, which are aimed primarily at 5G devices. The second preview version introduces a 5G state API that apps can use to query what type of network users are accessing. The blog post distinguishes between 5G NR (New Radio) and non-standalone networks (NSA), whereby a distinction between the latter and 5G Standalone (SA) is probably meant.
For foldables, apps in Android 11 can query the hinge angle to adjust the display accordingly. You can use the as
android.sensor.hinge_angle address the available sensor directly or via the AndroidX API to query the exact angle.
Privacy for camera and microphone
Android 11 also extends the manifest attribute
android:foregroundServiceType for services in the foreground that have to display a special notification for access to sensitive data. In Android 10, it was used, among other things, to query the location, and the current release extends it by releasing the camera and the microphone.
There are also some additions to the scoped storage, which was also introduced in the previous Android version and assigns each app an isolated sandbox on external storage such as SD cards. Files from the legacy storage model, which does not offer sandboxing, can now be transferred to scoped storage, and Android 11 offers better management of the files in the cache.
On the surface
Games and other apps can now select a preferred refresh rate and thus trigger a switch to 90Hz or 120Hz at runtime on devices that offer more than the usual rate of 60Hz. The frame rate API is available for both the SDK and the NDK (Native Development Kit), which is designed for machine-related applications, especially in C and C ++.
An API set for IME Transitions (Input Method Editor) is dedicated to a smoother transition of the soft keyboard. Apps can use the interface
WindowInsetsAnimation.Callback Process events related to changes in the position of the soft keyboard and over it
WindowInsetsAnimationController control independently.
Reboot, emulator and more
Other noteworthy innovations in the second Developer Preview include emulating the front and back cameras in the Android emulator. In addition, devices with Android 11 can restart the previously run applications when rebooting after an OTA update (Over the Air). In this case, apps can access the CE storage (Credential Encrypted) without users having to log in beforehand.
More details on the Android 11 Developer Preview 2 can be found refer to the Android developer blog. The Device system image is available for the Google devices Pixel 2, Pixel 3, Pixel 3a and Pixel 4 in the regular and the XL version. The Android emulator can also be used to test apps with Android 11.
. (tagsToTranslate) Android (t) Google (t) Mobile Development (t) Preview