Skip to content

[Android] Deprecated Edge-to-Edge APIs and ANR issues in purchases_flutter 9.9.0 / purchases_ui_flutter 9.9.1 #1575

@igopi77

Description

@igopi77

‼️ Required data ‼️

Environment

Output of flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.35.5, on macOS 15.6.1 24G90 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.2)
[✓] VS Code (version 1.107.1)
[✓] Connected device (4 available)
[✓] Network resources

Version of purchases-flutter:

  • purchases_flutter: 9.9.0
  • purchases_ui_flutter: 9.9.1

Testing device version:

  • Production app on Google Play Store targeting Android 15 (API 35)
  • Issue affects multiple Android devices (various API levels)

How often the issue occurs:

  • Every production build uploaded to Google Play Console shows the deprecated API warning
  • ANR issues are affecting a subset of users in production (impacting Play Store ranking)

Debug logs:
Google Play Console Pre-launch Report shows:

Deprecated APIs detected:
- android.view.Window.setStatusBarColor
- android.view.Window.setNavigationBarColor
- android.view.Window.setNavigationBarDividerColor

Source locations:
- com.revenuecat.purchases.ui.revenuecatui.customercenter.theme.CustomerCenterPreviewTheme$CustomerCenterPreviewTheme$1.invoke
- io.flutter.embedding.android.FlutterActivity.configureStatusBarForFullscreenFlutterExperience
- io.flutter.embedding.android.FlutterFragmentActivity.configureStatusBarForFullscreenFlutterExperience

Steps to reproduce:

  1. Integrate purchases_flutter: 9.9.0 and purchases_ui_flutter: 9.9.1 in Flutter app
  2. Implement Customer Center UI from purchases_ui_flutter
  3. Set targetSdkVersion 35 in android/app/build.gradle
  4. Build release APK/AAB and upload to Google Play Console
  5. Check Play Console → Pre-launch report → Warnings section
  6. Observe deprecated API usage warnings for edge-to-edge display methods

Expected behavior:

  • SDK should use Android 15+ compatible edge-to-edge APIs[1][2]
  • No deprecated API warnings in Google Play Console
  • No ANR issues related to RevenueCat SDK operations

Actual behavior:

  • Google Play Console flags deprecated window display APIs
  • ANR rate is affected (Google penalizes apps with ANR > 0.47%)
  • Play Store ranking and visibility impacted

Describe the bug

Our production Flutter app is receiving Google Play Console warnings about deprecated API usage originating from the RevenueCat SDK's Customer Center implementation. Additionally, we're experiencing ANR (Application Not Responding) issues that are negatively impacting our Play Store ranking.[3][1]

The deprecated APIs (setStatusBarColor, setNavigationBarColor, setNavigationBarDividerColor) are being called from CustomerCenterPreviewTheme in the purchases_ui_flutter package. These APIs have been deprecated in Android 15 as part of the edge-to-edge enforcement initiative.[2]

I've checked the latest versions' changelogs on pub.dev, and the recent updates don't mention fixes for these ANR or deprecated API issues.[4][5]

This is critical because:

  1. Google Play penalizes apps with ANR rates above 0.47%, affecting discoverability
  2. Android 15+ apps should comply with edge-to-edge guidelines
  3. Future Android versions may enforce stricter requirements or cause crashes with these deprecated APIs

Additional context

Questions:

  1. Is there a plan to address this deprecated API usage in upcoming releases?
  2. Is there a recommended workaround until this is fixed (e.g., building custom subscription UI without purchases_ui_flutter)?
  3. Are the ANR issues related to these deprecated API calls or separate threading issues in the SDK?

Thank you for your attention to this issue! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions