Go to previous page

14 Changes in Android 14: Vital Insights That Android Developers Need to Know

android 14
#
Android
#
technology
Harsh Srivastava
Harsh
Ruby on Rails Engineer
October 30, 2023

Android has released Android 14, and here are all the changes that have been made in the newer version. There are four types of changes that will affect all your apps:

  1. Core Functionality, i.e., the interaction between the apps and the core features and functions of the operating system.
  2. User Experience, i.e., modifications and enhancements in the way people interact.
  3. Accessibility, i.e., making things easier for a wide variety of people.
  4. Security, i.e., enhancing the protection of user’s data and privacy and overall security of the platform.

In this article, we'll dive into each of these changes one by one.

Let’s get started with the changes introduced in the core functionality!

Core Functionality Changes

  1. Your apps won't be able to trigger exact alarms anymore
    Some apps need to perform some actions at an exact particular time. For example, alarms, reminders, backup, etc. This requires a special permission named as <span class="text-color-code"> SCHEDULE_EXACT_ALARM </span> permission. In Android 14, this permission won’t be given by default and the app will require the user to grant it explicitly. Developers of such apps will have to upgrade their apps to require this permission.
  2. Context-registered broadcasts are queued while apps are cached
    Apps communicate with each other as well as with the system using a broadcast.
    There are two types of broadcasts, i.e., context-registered and manifest-declared.
    In Android 14, if the app is in the cached state, and the app sends a broadcast (mainly context-registered), it will put it in the queue instead of delivering it. It will be delivered only once the app becomes active again.
    Cached state is the state when an app is not being used actively but is running in the background.
    On the other hand, for manifest-declared broadcasts, they will be delivered right away. It may even get the app out of the cached state. The system can also take the app out of the cached state, under certain conditions, like when it needs to send a broadcast immediately or when the app’s health is checked.
  3. Processes Can’t Murder, But Can Commit Suicide
    In Android 14, apps will only be able to terminate their own background tasks. If it happens that any app tries to stop tasks of another app, it won’t be able to. Instead, in the developer logs it will throw “Invalid packageName: com.example.anotherapp”.
    This particular move will increase system performance and reduce battery consumption by removing the need to restart processes which have been terminated.
  4. MTU Got Promoted, But Is There Something To Worry About?
    MTU, a.k.a. Maximum Transmission Unit, is the maximum size of a package which can be sent in a transmission. Bluetooth uses this to transmit data across devices.
    In Android 14, the size of MTU is now set to 517 bytes. This means that in one transmission, it is capable of sending 517 bytes in one go.
    Now my dear developer, if you are smart enough, you would have figured out by now that this can be a problem. If it happens that another device happens to be of a lower version, it won’t be able to receive complete data in one go. For handling this issue, you have two ways.
    Solutions #1: If you control both the ends, you can ask the other device to accept packages up to 517 bytes. This will require the other app to perform a software update, but it will be ready.
    Solution #2: If we can’t control the other device, we will have to reduce the sending capacity according to the other device. This process will consume the same amount of time as it did before. Also, the developers will have to make sure that the package is of appropriate size.
    So before you type “BLUETOOTH_CONNECT” in your manifest file, make sure to keep these things in mind.
  5. Energy Drainers Will Be Kicked To The Restricted Standby Bucket
    Apps performs various jobs in the background. Sometimes it happens that these tasks takes too long to start or to stop. This is known as an ANR or Application Not Responding Error.
    In Android 14, if any app throws ANR error multiple times, Android will put it in the “Restricted Standby Bucket”. This will make sure that the app uses minimum battery power from device and does not runs very often.
    Developers who want to know whether or not their apps have been placed in the Restricted Standby Bucket, can use the UsageStatsManager tool to figure it out.
  6. New Limit For mlock in Android 14
    mlock, which is also known as memory locking is the ability of a process to reserve memory for its efficient functioning. It caches data which is required by it frequently  In earlier version, the maximum amount of memory which can be reserved by a single app was 64MB. In Android 14, it has been reduced drastically to 64KB.
    Various compatibility tests has been introduced with the name of Compatibility Test Suite (CTS) which will ensure whether or not the app is adhering to the new memory lock limit. Apps failing this test won’t be getting a chance to get published on the Google Play Store. So make sure that it
  7. No Behind The Scenes In Android 14
    Whenever we either switch from one app to another, or maybe when you hit the home button, the app which you were using, goes to the cached state. In this state, the app cannot use much of the device’s resources. If the app finds that there are too many apps running in the background, it can decide to terminate an application to free its space for important operations.
    In Android 14, the restrictions upon the activity which an app can do in the background have been increased even further. Once the app enters the cached state, the background activities will not be allowed after some time, until it has been opened again by the user.
    However, the supported lifecycle APIs, like services, JobScheduler, Jetpack WorkManager, etc. won’t be affected by this change.

These were all the changes, which are mostly related to the developers of the application, what all they have to take care of while developing the application. Now that we've covered core functionality changes, let's explore the enhancements in user experience.

User Experience Changes

  1. Your Personal Albums Will Remain Unseen To The App World
    Yes, the apps till date could have had access to your personal images, videos and other media which you didn’t wanted to share. With Android 14 into the picture, people can only share the media content which they want to share.
    This will ensure user’s privacy and more control over what they share with the apps. It is highly recommended to the developers, that they use Android’s photo picker in order to fetch the item which they want. Also, using Android’s photo picker will provide a more consistent experience.
  2. No Disturbance At All Until Its Necessary
    You might get annoyed when some of the apps just take over your screen and maybe show some unnecessary alerts which you didn’t wanted them to show in the first place. Sometimes its good, in case of alarms and incoming calls. But otherwise, it is not really needed and disturbs you when you might be in the middle of something important.
    Android 14 tackles this issue by snatching away this permission from the apps who show a full-screen intent notifications. You need to explicitly give them the permission, if you want them to show that alert.
    This will indeed make your experience better by disturbing you only when necessary.
  3. No Sticky Notifications From Now On
    There are two types of notifications. The ones which you can swipe right and remove and the ones which remains sticking and just won’t go. These are called dismissable and non-dismissable notifications, respectively.
    In earlier version of Android, the non-dismissable ones would used to stick. Even though it didn’t do anything, but it just feels like that something’s left. Personally, it annoys me a lot.
    However, in Android 14, users will be able to dismiss such notifications. But this won’t be applied on incoming calls and notifications sent by your organization, if it happens that he phone is managed by a company or an organization.
  4. Because Its Your Data!
    Data Safety Information, is an information provided by the developers of an app, which states what and how your data will be used in order to avail the features and services of the app.
    Right now, you can find this information in the Google Play Store, in the "Data safety" section of an app's page. You can see what all data will be used by the app. If you don’t like it, don’t install it. Because its your data!

Till now we have discussed the changes which will affect the android developers as well as the general users. But what about the special users?

Life had been already hard on them, so Android has made a very simple change to make it slightly better for them.

Accessibility Changes

  1. Zoom Text Up To 200%
    A very simple feature to be able to scale font size up to 200% will be of great help for the people with low vision. The scaled pixels (sp), which is used to set the size of text in the app, will work well with this font scaling feature.
    But a word of caution. Make sure that UI Testing is done with the maximum font size enabled in order to make sure that this feature does not affect the usability of the app.

Till now we have covered all the changes which will affect the developers and various users. Now we are coming to the last and the most important changes. Security.

Security Changes

  1. No Entry For Outdated Apps
    Whenever apps are created, they are designed by keeping the target API level in mind.
    Before going ahead, let’s first understand what target API level is.
    Whenever there is a change in Android’s API, i.e., the way apps can communicate with the Android Operating System, it releases a new manual for the developers, because that’s how they develop apps (by communicating with the operating system about what exactly to do). This is a new revision for the existing API documentation.
    The number which helps us uniquely identify which revision the API version is, is known as the API level.
    The minimum target API level for developing apps have been changed to 23. This is done because in the older APIs, there were some of the permissions which could result in a breach in user data or privacy. By ensuring that apps are developed with a minimum target level API, we ensure that the data is safe and is not accessed by older apps with security issue.
    You won’t be able to install apps having API level lower than 23 even if you want to. It will throw <span class="text-color-code"> INSTALL_FAILED_DEPRECATED_SDK_VERSION </span> error in Logcat.
    However, the apps which are already present in the phone before migrating to Android 14, will remain unaffected. If you want to test an app with an older API level, you may use the following command by replacing the FILENAME with the name of the file:
	
Copy
adb install --bypass-low-target-sdk-block <FILENAME>.apk
  1. No More Serving Data To Advertisers
    Let’s first understand how private media is handled in Android.
    Whenever an app saves any kind of file on the device, the system keeps track of the owner of the file. This data is stored in the form of tables, in which you can find a column named as <span class="text-color-code"> OWNER_PACKAGE_NAME </span>. If someone gets access to this metadata, they will be able to know which file belongs to which app. Using this people can track user’s activity or even use it for malicious purpose.
    In Android 14, this column will not be visible anymore. The access to view the owner will only be granted in either of the two conditions.
    a. If the app that created the media file has a package name which other apps can always see. Its only when is no privacy risk if the app’s name is public.
    b. Apps requiring QUERY_ALL_PACKAGES permission. This permission isn’t given easily to any app. Before it get listed on the Google Play Store, the apps need to follow Google’s rules for using this permission.

These are all the things that you need to take care of before you develop or even use an app.

I hope you found this blog informative and I was able to deliver up to your expectations. If you liked this blog post, sign up for our newsletter and stay tuned for more compelling ones!

Until we meet again

Recommended Posts

Open new blog
Next.js vs. Vue.js
#
nextjs
#
Vuejs

Next.js vs. Vue.js- The Ultimate Showdown

Harshita
September 5, 2023
Open new blog
Pink Venn diagram
#
collaboration
#
team

Four Essential Skills for Successful Human Collaboration

Achin
April 17, 2023
Open new blog
Google Health Connect
#
health-tech
#
innovation

A look into Google's Health Connect

Sanskar
June 9, 2023