Technical features in Android 12 — For Developers

Important changes related to performance, security, and privacy

Frederick Klyk
4 min readMar 21, 2022
Photo by Jason Dent on Unsplash

In the first part of this blog series, the new features were evaluated and rated in the context of design and user experience, most of which have been implemented very successfully and which create significant added value for both the end user and the developer.

See Part 1, Android 12 for Developers — Changes and improvements in user experience and design: https://medium.com/@FrederickKlyk/android-12-for-developers-changes-and-improvements-in-the-user-experience-and-design-513fb1a6344f

This part deals with important changes and innovations in the areas of performance, security, and privacy as well as with the topics of traceability and the high-performance execution of multimedia applications, which are placed in the foreground and are primarily intended to address end users.

Due to the advanced beta phase, it’s worth taking a closer look at some of the new functionalities and APIs discussed in this blog post from both a developer and user perspective.

performance, security, and privacy

Starting with Android 12, the Performance Class was introduced, which developers can use to classify the performance of a device. The performance class can be used to determine whether the respective end device meets the minimum requirements for the use of certain additional device functions in the corresponding Android version.

With each subsequent Android version that appears, the performance class is incremented accordingly, so that the best possible user experience can be provided for the user, depending on the device performance.

An update to a higher Android version does not therefore automatically have to correlate with reaching the higher performance class. The requirements are placed on the video playback functions, recording functionalities and screen resolution as well as working memory and read/write speed.
A query regarding the achievement of a performance class can be queried simply.

Privacy Dashboard

The privacy dashboard shows the user a history of which apps were used at what time and how often certain functionalities, such as the camera or microphone, were used. The user can then also deny certain rights for an app via these screens.

The privacy dashboard is a very good feature for the end user to be able to understand when which functionalities were used. Furthermore, a corresponding icon is displayed to the user in the top right of the status bar if an app is using the camera or microphone. In addition, access to the camera and microphone sensors can be deactivated for the entire system via the Quick Settings menu.

Approximate location

To increase user privacy, apps can be compiled with targedSDK=S, which allows the app to locate using an approximate rather than a precise location.

Many apps, such as weather apps, do not require the exact location of the user to provide a weather forecast.

While requests for the approximate location (ACCESS_COARSE_LOCATION) are possible individually, as soon as developers want to request a precise location (ACCESS_FINE_LOCATION), they must always send the request for an approximate location at the same time — otherwise they will get the following error message when compiling in the logcat: ACCESS_FINE_LOCATION must be requested with ACCESS_COARSE_LOCATION.

From the user’s point of view, this restriction is excellent because in most cases only the approximate location is required.

Allocation of Bluetooth permissions

Starting with Android 12, three new Bluetooth rights have been added to interact with other nearby Bluetooth devices. This means that there is no longer any need to carry out a location determination request.

The rights can be requested based on the following use cases:

BLUETOOTH_SCAN: If you want to search for nearby Bluetooth devices
BLUETOOTH_ADVERTISE: If your own end device should be discoverable for other Bluetooth devices
BLUETOOTH_CONNECT: When connecting to an already paired device

The granular division of the Bluetooth rights improves the traceability of the access rights according to the motto: as little as possible and as much as necessary.

Recap

The new permissions in the areas of Bluetooth and localization promote a more privacy-friendly app design and better traceability for the user. The traceability of the individual access rights is also supported by the new privacy dashboard.

If you want to get an overview of all new features and changes, you can read this at https://developer.android.com/about/versions/12.

References

https://developer.android.com/about/versions/12/behavior-changes-12

https://developer.android.com/about/versions/12/features/bluetooth-permissions

https://developer.android.com/about/versions/12/approximate-location

https://developer.android.com/about/versions/12/features/performance-class

--

--

Frederick Klyk

Software Architect, Senior Android Developer & team leader @ adesso mobile solutions, Twitter: https://twitter.com/frederickklyk