Are you an Android developer eagerly awaiting the next big update? Well, your wait is over with the arrival of Android 14! This latest version of the Android operating system, known as Upside Down Cake, brings a plethora of exciting features, promising to revolutionize app design and development. In this article, we will explore Android 14 from a developer’s perspective, diving deep into its innovative features, the impact on app design, and the best practices for leveraging its powerful capabilities.
Minimum Android Studio Version required: Android Studio Flamingo | 2022.2.1 or higher.
Android 14 brings a host of new features and updates for developers to take advantage of. Let’s dive into some of the most significant changes.
Freezing cached applications
Android 14 introduced several restrictions on the use of cached applications. After a brief interval, we freeze cached apps on Android 14, giving them no CPU time. Cache-based programmes use up to 50% fewer CPU cycles in Android 14 Beta populations when compared to Android 13 public devices. Therefore, outside of standard Android app lifecycle APIs like foreground services, JobScheduler, or WorkManager, background work is prohibited.
Optimized broadcasts
We changed how apps get context-registered broadcasts once they enter a cached state; they may be queued, and recurring ones, like BATTERY_CHANGED, may be combined into a single broadcast, in order to keep frozen applications frozen longer (i.e., not receive CPU time).
Faster app launches
With broadcast optimizations and cached apps, we were able to raise the platform’s long-standing caps on the maximum number of cached apps in Android 14, which decreased the number of cold app starts, which is based on the RAM capacity of the device. The beta group experienced 20% fewer cold app starts on 8GB devices and nearly 30% fewer on 12GB devices. In comparison to warm companies, cold startups are slower and require more electricity. This approach effectively reduces total programme starting times as well as battery consumption.
Reduced memory footprint
The Android user experience can be greatly enhanced by improving the Android Runtime (ART). One of the most important metrics we consider is code size; smaller generated files are better for memory (RAM and storage). With no degradation in speed, Android 14’s ART optimizations lower code size by an average of 9.3%.
Since customization is fundamental to the Android experience, Android 14 maintains our promise to empower users to tailor their experience to meet their unique requirements. This includes improved accessibility and internationalization tools.
Bigger fonts with non-linear scaling: With Android 14, users will be able to magnify text by 200%. The maximum text size scale for Pixel devices used to be 130%. A non-linear font scaling curve is automatically applied to text that is large enough to keep it from increasing at the same rate as smaller text. Learn more here.
Per-app language preferences: You can dynamically update your app’s localeConfig with LocaleManager.setOverrideLocaleConfig to customize the set of languages displayed in the per-app language list in Android Settings.
IMEs can now use LocaleManager.getApplicationLocales to know the UI language of the current app to update the keyboard language. Starting with Android Studio Giraffe and AGP 8.1, you can configure your app to support Android 13’s per-app language preferences automatically.
Regional preferences: Users can customize temperature units, the first day of the week, and numerical systems based on their regional preferences.
Grammatical Inflection: You may add support for users who speak languages with grammatical gender more quickly thanks to the Grammatical Inflection API. All you have to do to display customized translations is incorporate the API and add translations that are inflected for every grammatical gender in the languages that are affected.
Ultra HDR for images: With support for the Ultra HDR image format, Android 14 adds support for 10-bit high dynamic range (HDR) photographs. Because of the format’s complete backward compatibility with JPEG, programmes can work with HDR photographs with ease.
Zoom, Focus, Postview, and more in Camera Extensions: With Android 14, Camera Extensions are enhanced and expanded, enabling apps to manage longer processing times and, on compatible devices, better photographs through the use of compute-intensive algorithms like low-light photography.
Lossless USB audio: Lossless audio formats are supported on Android 14 devices, enabling audiophile-quality experiences when using USB-wired headsets.
Custom meshes with vertex and fragment shaders: Custom meshes, which are defined as triangles or triangle strips and may optionally be indexed, are now supported by Android 14. Custom properties, vertex strides, variables, and AGSL-written vertex/fragment shaders are used to specify these meshes.
Hardware buffer renderer for Canvas: In Android 14, HardwareBufferRenderer is introduced to help with drawing with hardware acceleration into a HardwareBuffer using Android’s Canvas API. This is especially useful if your use case involves low-latency drawing through SurfaceControl communication with the system compositor.
Predictive Back: In addition to the back-to-home animation seen in Android 13, Android 14 brings two additional Predictive Back system animations: cross-activity and cross-task. To give more time for refinement and to let more apps choose to use Predictive Back, the system animations are still hidden behind a developer option. However, users can now access Material and Jetpack Predictive Back animations.
Data sharing updates: When an app shares location data with third parties, users will see a new section in the location runtime permission dialogue where they can manage the app’s data access and obtain further information.
Partial access to photos and videos: Android 14 users can now allow your app access to only specific images and videos when it asks any of the visual media permissions (READ_MEDIA_IMAGES / READ_MEDIA_VIDEO) introduced in SDK 33. We advise using our most recent best practices to modify your app in light of this update.
Android prioritizes app compatibility to make updates faster and more seamless with each platform release. To offer you more time to make any necessary app modifications, we’ve made the majority of changes to Android 14 opt-in until your app targets SDK version 34. We’ve also improved our tools and processes to help you get ready sooner.
Easier testing and debugging of changes: This year, Android will make many opt-in modifications toggleable once more to make it easier for you to test the changes before they impact your app. You can use the toggles in Developer settings or adb to individually force-enable or deactivate the changes. See the information on this link.
For the best development experience with Android 14, we recommend that you use the latest release of Android Studio Hedgehog. Once you’re set-up, here are some of the things you should do:
Android 14 is offering an array of new features and improvements that can elevate app design and development to new heights and ensure your app is compatible and provides a great user experience. By embracing the customization options, developers can adapt their apps to meet the ever-changing preferences and needs of users creating more engaging and user-friendly applications.
Reference taken from: https://android-developers.googleblog.com/2023/10/android-14-is-live-in-aosp.html
https://developer.android.com/about/versions/14/summary
https://developer.android.com/about/versions/14/behavior-changes-14
About the Author:
Anand Singh is currently working with Mantra Labs as a Tech Manager. He has a strong knowledge of mobile development.
Let’s take a trip back in time—2008. Netflix was nothing like the media juggernaut it…
Ever wondered what life would be like if the Sun took a day off? Picture…
The Importance of Interaction Design Principles In the ever-evolving landscape of digital experiences, interaction design…
Do you think technology will advance to a point where people rely on it for…
If you think Mark Zuckerberg is just a tech genius who stumbled upon success, think…
In today’s digital landscape, where users are bombarded with options, creating a product that stands…
This website uses cookies.