Android15 may enforce edge-to-edge apps, but Google added a quiet opt-out option

DeepakBotu Best of 2024

2024-08-05 22:06

Greetings of the day questers!! 🤩

Today we got some informative rather than exciting news! 🔥

Let's check the views of Google on edge-to-edge apps on Android apps. 👇🏻


If you're hoping that all your apps will finally go edge-to-edge in Android 15, you may be in for some disappointment.

Figure 1, view larger image

TL;DR

  1. Starting in Android 15, apps that target the new release are forced to go edge-to-edge by default, which makes the status and navigation bars transparent.
  2. However, Google quietly added an API that apps can use to opt out of edge-to-edge enforcement.
  3. This API isn't mentioned in any of Google's developer documents, blog posts, or codelabs, though.

  • Android has long allowed apps to utilize the full screen by drawing content underneath the status and navigation bars, yet many apps haven't adopted this feature. The upcoming Android 15 update was expected to mandate edge-to-edge functionality, leaving developers with no choice. Apps can achieve this by using specific APIs that instruct the OS to display content under the system bars. Google didn't enforce this earlier because many apps might face UI issues if forced to go edge-to-edge. For instance, a floating action button might overlap with the navigation bar.
  • To address potential overlaps, Google provided developers with insets, which define parts of the app's screen that intersect with the system UI. Since edge-to-edge wasn't mandatory, many developers didn't prioritize resolving these UI conflicts. However, with Android 15, this is supposed to change.
  • Google announced during the Android 15 Beta 1 release that apps targeting this version will default to edge-to-edge mode. They provided developers with updated documentation, tutorials, and codelabs to help manage this change. However, these resources didn't mention an API that allows apps to opt out of edge-to-edge mode, which Google quietly added.

On the left: App targets SDK 34 (Android 14) and is not edge-to-edge on an Android 15 device.

On the right: App targets SDK 35 (Android 15) and is edge-to-edge on an Android 15 device.

  • Android 15 introduces an attribute called `windowOptOutEdgeToEdgeEnforcement` that allows apps to opt out of the new edge-to-edge display mode. By default, this attribute is set to false, meaning apps targeting Android 15 will display content under the status and navigation bars. However, if set to true in an app's theme files, the app can avoid this enforcement.
  • The description of this API warns that it will be deprecated and disabled in a future Android version, so this option won't be available indefinitely. Developers have until at least August 31, 2026, before the Google Play Store requires apps to target Android 15, providing them with extra time to adjust.
  • Despite this opt-out option, it's encouraged that developers update their apps to support edge-to-edge mode. Some apps, including Google's own, have been observed not using edge-to-edge, even though they target Android 15, suggesting a selective use of the opt-out feature.
Figure 2, view larger image
Figure 3, view larger image

Even Chrome might avoid the full-screen rule. Some developers want Google to allow apps to choose if they want to go full screen or not. If Google listens, the whole full-screen requirement could be dropped.


So, what's your thoughts on this?

And that's it for this thread guys!

Hope you like the thread. 😊

Dont forget to drop a like and comment. It definetly appreciates me to make more informative threads like these. 🤩

Follow me @DeepakBotu 

Connect with me on Instagram @deepakbotu

Tech