capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

Android 15 compatibility for Status-bar

Open sergtop opened this issue 11 months ago • 16 comments

I recently got the message in Google Play (along with edge-to-edge recommendation)

Your app uses deprecated APIs or parameters for edge-to-edge
One or more of the APIs you use or parameters that you set for edge-to-edge and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters:

android.view.Window.getStatusBarColor
android.view.Window.setStatusBarColor
These start in the following places:

com.capacitorjs.plugins.statusbar.StatusBar.<init>
com.capacitorjs.plugins.statusbar.StatusBar.setBackgroundColor
com.capacitorjs.plugins.statusbar.StatusBar.setOverlaysWebView
To prepare for the change to Android 15, migrate away from these APIs or parameters.

Do you have any suggestions for fixing this without removing the plugin?

sergtop avatar Jan 18 '25 20:01 sergtop

I recently got the message in Google Play (along with edge-to-edge recommendation)

Your app uses deprecated APIs or parameters for edge-to-edge
One or more of the APIs you use or parameters that you set for edge-to-edge and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters:

android.view.Window.getStatusBarColor
android.view.Window.setStatusBarColor
These start in the following places:

com.capacitorjs.plugins.statusbar.StatusBar.<init>
com.capacitorjs.plugins.statusbar.StatusBar.setBackgroundColor
com.capacitorjs.plugins.statusbar.StatusBar.setOverlaysWebView
To prepare for the change to Android 15, migrate away from these APIs or parameters.

Do you have any suggestions for fixing this without removing the plugin?

Getting same warning on playstore console. In capacitor doc https://developer.android.com/reference/android/R.attr#windowOptOutEdgeToEdgeEnforcement is mention, where to use it and how to remove this warning, waiting for reply.

omprakashdashore1 avatar Jan 23 '25 06:01 omprakashdashore1

Same here, I'm getting this warning:

Your app uses deprecated APIs or parameters for edge-to-edge
One or more of the APIs you use or parameters that you set for edge-to-edge and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters:

android.view.Window.setDecorFitsSystemWindows
androidx.core.view.WindowCompat$Api35Impl.setDecorFitsSystemWindows
androidx.core.view.WindowCompat.setDecorFitsSystemWindows
android.view.Window.getStatusBarColor
android.view.Window.setStatusBarColor

evrrnv avatar Jan 24 '25 11:01 evrrnv

same here

bohdanovdmytro avatar Jan 27 '25 05:01 bohdanovdmytro

Your app uses deprecated APIs or parameters for edge-to-edge One or more of the APIs you use or parameters that you set for edge-to-edge and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters: android.view.Window.setStatusBarColor android.view.Window.setDecorFitsSystemWindows These start in the following places:

com.google.android.material.bottomsheet.a.onCreate androidx.core.splashscreen.e.a

To fix this, migrate away from these APIs or parameters.

TamilCodeRays avatar Jan 31 '25 11:01 TamilCodeRays

I have the same issue. Any updates?

merbin2012 avatar Feb 06 '25 14:02 merbin2012

Please approve the above pull request, if it is correct.

merbin2012 avatar Apr 01 '25 17:04 merbin2012

I'm also getting the following warning: Edge-to-edge may not display for all users @merbin2012 does your PR solves this warning as well?

HarelM avatar Apr 10 '25 13:04 HarelM

This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.

ionitron-bot[bot] avatar Apr 17 '25 11:04 ionitron-bot[bot]

I have the same issue. Please remove

android.view.Window.setStatusBarColor
android.view.Window.setDecorFitsSystemWindows

from com.capacitorjs.plugins.splashscreen.SplashScreen.java

I believe this will solve the issue, I can't remove it because SplashScreen.java is an internal class

adarsh-dhakad avatar May 19 '25 11:05 adarsh-dhakad

Also from Android version 16 on the Google documentation states for the attribute windowOptOutEdgeToEdgeEnforcement (that's refered to in the StatusBar plugin API documentation):

But if the window belongs to an app targeting BAKLAVA or above, this attribute is ignored and the enforcement is applied regardless.

I guess this should also be considered towards any solution.

See also this issue: https://github.com/ionic-team/capacitor-plugins/issues/2350

Mr-Rayman avatar May 19 '25 22:05 Mr-Rayman

@alexgerardojacinto Is there anything missing for the merge to happen?

ccerrillo avatar Jun 18 '25 10:06 ccerrillo

Any news?

SvenBudak avatar Jul 05 '25 23:07 SvenBudak

Any update on this?

marioshtika avatar Jul 17 '25 14:07 marioshtika

Any update on this would be appreciated

baptlma avatar Aug 18 '25 18:08 baptlma

any news?

gelinger777 avatar Aug 26 '25 08:08 gelinger777

Bump? Is this on the roadmap? Thank you!

lincolnthree avatar Nov 12 '25 15:11 lincolnthree