cordova-plugin-statusbar
cordova-plugin-statusbar copied to clipboard
Android 35 StatusBarOverlaysWebView false not working
Bug Report
Problem
I have an Android API 35 Emulator (Pixel 8 Pro API 35) and StatusBarOverlaysWebView set to false in config.xml. The content of the webview is behind the statusbar (and notch, which would be okay). With Android API 34 and the same device (Pixel 8 Pro API 34) the content is below the statusbar. Also the Android navigation Item (line) in the bottom is not overlayed.
What is expected to happen?
With Android API 35 the statusbar should also be respected if StatusBarOverlaysWebView is set to false (and also the navigation at the bottom)
What does actually happen?
The App is fullscreen and underneath the statusbar.
Information
Create Pixel 8 Pro API 35 Emulator and set StatusBarOverlaysWebView to false.
Command or Code
Environment, Platform, Device
Version information
Latest cordova and cordova-plugin-statusbar versions.
Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
@mannisc we experience the same behavior. to be more precise We also have StatusBarOverlaysWebView set to false in config.xml.
Wenn we build our App with android-targetSdkVersion ste to 35 with 35.0.0 Buildtools and deploy it to an Api 35 emulator the webviewcontent is behind the statusbar.
This is a Behaviorchange in Android 15 https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge
We hope the statusbar plugin can address this behavior change
I have the same problem. Did you manged to fix this?
@mannisc and @ksch10bob I did managed to fix it temporarily. I added the following inside the config.xml file:
<config-file parent="/resources/style" target="app/src/main/res/values/themes.xml">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</config-file>
@cmartin81 seems like a solution and not a temporarily fix to me. Thanks for that.
@cmartin81 @ksch10bob
Even with that setting enabled, Admob interstitials take up the notch and status bar. If you use location on some Xiaomi devices, the location indicator is overexposed to the closing X of the interstitial and makes it difficult to close the ad. Does anyone have a solution?
Wouldn't the Admob interstitials be it's own native view? It would have to manage safe area insets themselves it is. So it would be a problem with the admob library, or the plugin (whatever builds and controls the native view container that holds the ad). Likely the plugin is simply using an old version of the admob plugin.
I'm hiding both of these messages cause they are off-topic to the StatusBarOverlaysWebView issue.
Is this update is for new feature of android 35 with edge to edge issues? I have two issues with Google Play, one of them is for Background Color of statusbar and the other for edge-to-edge. Should I update to new version of plugin, I am using version 3.0.0. Many thanks
One or more of the APIs you use or parameters you have defined for edge view and window view have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters:
android.view.Window.setStatusBarColor
They start in the following places:
org.apache.cordova.statusbar.StatusBar.setStatusBarBackgroundColor
org.apache.cordova.statusbar.StatusBar.setStatusBarTransparent
To prepare for the move to Android 15, please stop using these APIs or parameters.
I have this message too in Google Play. Should I stop to use this plugin or just setStatusBarXXX ?
Help...
@ksch10bob
android:windowOptOutEdgeToEdgeEnforcement is a temporary solution, as it is outlined in the document that it will be disabled in the future.
I had come across the same issue after upgrading to Cordova Android 13. I tried to upgrade to the newly released Cordova Android 14, and the status bar appears to now be working as expected on my Pixel 7a (Android 15) with the StatusBarOverlaysWebView set to false.
I have this message too: What could we do?
One or more of the APIs you use or parameters you have defined for edge view and window view have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters:
android.view.Window.setStatusBarColorThey start in the following places:
org.apache.cordova.statusbar.StatusBar.setStatusBarBackgroundColor
org.apache.cordova.statusbar.StatusBar.setStatusBarTransparentTo prepare for the move to Android 15, please stop using these APIs or parameters.
@BenLaKnet This is just a deprecation warning. This can be fixed in a later release and should currently not bother you because edge-to-edge is disabled for cordova-android 14 and this is allowed when the app is compiled against Android 15 (SDK 35). This must be fixed, when you compile against Android 16 (SDK 36).
Many thanks @GitToTheHub
The solution is to use cordova-android 14, which was released on 26.03.2025