Ensuring a Seamless Experience: How We Prepared Our App for Android 15

Android Apr 21, 2025

At Halodoc, we believe every user deserves a consistent, high-quality healthcare experience.
As of March 2025, Android 15 has reached 4.51% adoption across active Android devices. While this may appear to be a small fraction, at Halodoc, we see it as a responsibility to ensure that even this growing user base experiences the same reliability, consistency, and performance our platform is known for.
Proactively supporting Android 15 helps us avoid unexpected crashes, UI glitches, and behavior inconsistencies, ensuring uninterrupted care delivery as the platform adoption continues to grow.

In this post, we’ll walk through how our engineering team addressed the Android 15 platform changes, the challenges we encountered, and how we ensured a smooth transition without compromising the user experience or development velocity.

What’s New in Android 15 and Why It Matters

Before diving into the migration process, it’s important to understand what Android 15 brings to the table and why Google is introducing these changes. Android 15 builds upon the platform's goals of improving user privacy, enabling better app performance, and delivering more consistent experiences across devices.

Some of the key changes in Android 15 include:

  • Stricter Foreground Service Rules: Apps must declare specific service types and start services within a short time window to avoid ANRs. This helps the system manage battery and performance more efficiently.
  • Enhanced Privacy Protections: Android 15 reinforces scoped storage and limits on background activity launches, ensuring apps don’t misuse sensitive permissions or drain resources unexpectedly.
  • Modernized System UI Practices: With the push for edge-to-edge layouts and gesture-friendly interfaces, apps are expected to use WindowInsets and theme-based styling for a seamless, immersive experience.
  • API Deprecations and Behavioral Changes: Deprecated APIs like direct access to window.statusBarColor and legacy Handler() usage without a Looper are phased out in favor of safer, more structured alternatives.
  • Improved Media and Alarm Controls: More granular controls over exact alarms and media playback services help apps respect system resources and user preferences.
  • Increased Minimum Target SDK Version: Google has raised the minimum targetSdkVersion from 23 to 24. This means apps must now target at least Android 7.0 (Nougat) or higher to be distributed via the Play Store. This shift encourages developers to adopt more modern APIs and behaviors, improving consistency and security across the ecosystem.
  • Support for 16 KB Page Sizes: Android 15 adds support for devices with 16 KB memory page sizes. Some native code and third-party libraries may not be compatible with this by default. We reviewed our native dependencies and ensured that the libraries we use are built with 16 KB compatibility, which helps prevent crashes on future hardware.
  • Background Network Access Restrictions: One of the more subtle but impactful changes in Android 15 is related to how background network requests are handled. If an app initiates a network request outside a valid process lifecycle (such as after the app is closed or killed), it will now receive exceptions such as UnknownHostExceptionor other IOException types.

Updating to Android 15

Our first step was to update the targetSdkVersion and compileSdkVersion to 35. We ensured that the gradle wrapper was updated to 8.7, and the Android gradle Plugin version was bumped to 8.6.0.
Next, we updated the Halodoc project’s SDK configurations to target Android 15.

Once these changes were made, we observed a series of compile-time warnings and build errors, most of which were related to deprecated APIs and third-party libraries that were not fully compatible with the latest SDK. We upgraded third-party libraries to a compatible version and fixed the deprecated APIs.

Foreground Services and Background Task Changes

One of the critical changes we had to deal with was Android 15’s stricter control over foreground services and background task execution. Several flows in our Halodoc consumer app depend on background tasks for data sync and file uploads, such as the prescription upload feature in the Pharmacy module. This process often involves transferring large files and must remain reliable even if the user navigates away from the screen.
Although most of our background tasks have been migrated to WorkManager, we still rely on foreground services for a few specific use cases.

  • When uploading prescriptions, that must continue even if the user switches apps
  • When performing user-visible tasks that require guaranteed execution

With Android 15 enforcing stricter foreground service requirements, we revisited all such implementations. We ensured that each service is explicitly categorized using the foregroundServiceType attribute (e.g., dataSyncmediaUpload) and that the service is started within the required timeframe to prevent ANRs

Edge-to-Edge UI Migration

One of the most significant changes introduced in Android 15 is the platform's default enforcement of edge-to-edge layout rendering. Now, unless explicitly overridden, Android 15 renders layouts from the very edges of the screen. With this change, many of the app’s screen was impacted, and we had to manually manage layout insets to prevent content layout overlap with system UI elements.

To manage this, we enabled edge-to-edge rendering by updating our base configuration:

  • Allow content to draw behind system bars by disabling default window insets.
  • Configure status and navigation bars to use light icons based on the background color.
  • Maintain contrast and readability when content extends behind system bars. This configures light or dark appearance for system bars to match the theme for better visual clarity.

Once edge-to-edge was enabled, we handled window insets manually to ensure our content was laid out correctly without being obstructed:

  • Apply dynamic top and bottom padding based on system bar dimensions.
  • Ensure content is not hidden behind status or navigation bars. This applies padding dynamically to ensure content doesn't overlap with the status or navigation bars

The toolbar, which now extends behind the status bar, also required padding adjustments to maintain spacing and visual separation. Additionally, we matched the toolbar color with the status bar to maintain visual continuity across the top edge of the screen.

  • Match toolbar background color with status bar for visual continuity.
  • Apply top padding to avoid overlap with the status bar area. This ensures the toolbar background is styled correctly and offset to avoid clashing with the status bar.

Handling Deprecated Status Bar Changes

Another change introduced with Android 15 is the deprecation of directly setting the status bar color using window.statusBarColor. Instead, Android 15 introduces a more structured way of customising system bar appearances using the WindowInsetsController theme attribute. We used setOnApplyWindowInsetsListener on the root view to apply the desired background color dynamically.

Handling Deprecated APIs

As expected with every major Android release, Android 15 deprecated several older APIs. One such change we encountered was with the use of Handler() without a Looper.

In addition, we had some delays implemented using Handler().postDelayed() screens that were already lifecycle-aware. We replaced these with lifecycleScope.launch { delay(...) } constructs, which not only aligned better with modern practices but also helped reduce memory leaks and unnecessary thread management.

Conclusion

In this article, we’ve shared our key experiences and learnings from migrating our apps to Android 15. As Android developers, we once again had to adapt to platform-level changes, ranging from edge-to-edge layout enforcement to stricter background execution rules to ensure our app remains stable, modern, and compliant with Play Store policies.
Android 15 introduces impactful improvements like background network request restrictions, foreground service constraints, and refined system UI behaviors. While some of these changes required rethinking legacy implementations, they ultimately help create more consistent and secure app experiences across the ecosystem.
If you’d like to explore other updates introduced in Android 15 that may affect your app, we recommend checking out the Android 15 behaviour changes.

References

Join us

Scalability, reliability, and maintainability are the three pillars that govern what we build at Halodoc Tech. We are actively looking for engineers at all levels and if solving hard problems with challenging requirements is your forte, please reach out to us with your resumé at careers.india@halodoc.com.

About Halodoc


Halodoc is the number 1 Healthcare application in Indonesia. Our mission is to simplify and bring quality healthcare across Indonesia, from Sabang to Merauke. We connect 20,000+ doctors with patients in need through our Tele-consultation service. We partner with 3500+ pharmacies in 100+ cities to bring medicine to your doorstep. We've also partnered with Indonesia's largest lab provider to provide lab home services, and to top it off, we have recently launched a premium appointment service that partners with 500+ hospitals that allow patients to book a doctor appointment inside our application. We are extremely fortunate to be trusted by our investors, such as the Bill & Melinda Gates Foundation, Singtel, UOB Ventures, Allianz, GoJek, Astra, Temasek, and many more. We recently closed our Series D round and in total have raised around USD$100+ million for our mission. Our team works tirelessly to make sure that we create the best healthcare solution personalized for all of our patient's needs, and we are continuously on a path to simplify healthcare for Indonesia.

Tags

Roshan

SDE3-Android