Thursday, May 20, 2021

Android 12 will make it easier for developers to know how powerful a device is

Android devices come in all shapes and forms. We have cheaper smartphones with weaker specifications and more expensive ones with better internals. You, as a user, can obviously tell if your smartphone can be considered “powerful” or not by simply looking up those specifications online. But how does an app running on your device know that? It could theoretically do things like match your device name against a database then pull specs from that, check system properties for the SoC part number/RAM capacity/etc, or call Android APIs that list information like resolution, etc., but there’s no easy, unified way to tell what kind of performance an Android device can deliver. It’d be useful if there was a quick way to group devices into categories so an app can provide different experiences that are optimized for each class of device. To that end, Google has introduced at I/O 2021 what they’re calling “performance class,” starting with Android 12.

According to Google, this standard “defines a set of capabilities that go beyond Android’s baseline requirements. Devices that meet the performance class requirements can support more demanding use-cases and deliver higher quality content.” App developers can check what performance class a device is part of at runtime and then tailor the app to deliver an experience that takes full advantage of the device’s performance. Initially, Google says it is “focusing performance class capabilities on media use-cases, with requirements including camera startup latency, codec availability and encoding quality, as well as minimum memory size, screen resolution and read/write performance.”

On the Android Developers page, Google says that each version of Android has its own corresponding performance class, which means there’s a performance class for Android 12 and there’ll be one for Android 13, 14, and so on. The performance class will be defined in the Compatibility Definition Document (CDD) for that particular Android OS version (note: Android 12’s CDD isn’t public yet) and whether or not a device actually meets that performance class is enforced by the Compatibility Test Suite (CTS), an automated set of tests that verifies compatibility with an Android OS version.

Performance classes are forward-compatible, which means that a device can upgrade to a new Android version without changing its performance class, but it also means that devices can change their class if they meet the requirements of that new OS version. While the concept of a performance class is being introduced with Android 12, Google says it will also define a performance class for Android 11. This means that highly capable devices upgrading from Android 11 to Android 12 that meet the performance class requirements for Android 11 but not for Android 12 can still inform apps that they’re high-performing devices.

Although Google hasn’t shared exact details about what requirements entail the performance class for Android 12, we did a bit of digging and found some of the requirements. They include:

  • At least 6GB of RAM
  • At least 400dpi and 1080p resolution
  • At least 150MB/s sequential write, 250MB/s sequential read, 10MB/s random write, and 40MB/s random read speeds

As well as other requirements for a maximum number of concurrent video decoder and encoder sessions, low codec initialization latency, low amount of playback frame drops, and more.

This feature may be useful for app developers to improve the overall experience on not just devices meeting the “performance class” spec, but also for lower-end phones. If an app detects a phone doesn’t meet the requirements for a “performance class” device, they can turn off certain, more demanding features or visual effects in order to improve the way that app works on lower-end phones. Likewise, they can add features on performance class devices that lower-end phones wouldn’t normally support without compromising the experience of these users.

The post Android 12 will make it easier for developers to know how powerful a device is appeared first on xda-developers.



from xda-developers https://ift.tt/2RqKAK8
via IFTTT

No comments:

Post a Comment