erisu commented on issue #281:
URL:
https://github.com/apache/cordova-plugin-statusbar/issues/281#issuecomment-3057572485
This is **not** a status bar plugin issue.
1. **Cordova-Android 13.0.0** does not officially support **SDK 35**.
2. Starting from **Android SDK 35 and above**, Android enforces
**Edge-to-Edge behavior** by default.
- Specifically once the targetSdk is set to 35.
The recommended solution is to upgrade to **Cordova-Android 14.x**, which
adds support for SDK 35 and explicitly opts out of the Edge-to-Edge behavior.
---
If you're **temporarily locked** into **Cordova-Android 13.0.0**, you might
be able to inject the **opt-out flag** manually. However, this is a **temporary
workaround**, and upgrading to **14.x** is the recommended solution.
Keep in mind: Cordova does **not officially support** such patches. It is
not guaranteed to always work.
Also, similar Edge-to-Edge issues may arise when targeting **SDK 36**, as
the opt-out flag is expected to be removed in future Android releases. The
Cordova team is currently working on **Cordova-Android 15.0.0** to try and
address these upcoming changes.
---
The temporary workaround, if you're staying on 13.0.0:
```xml
<platform name="android">
<preference name="android-targetSdkVersion" value="35" />
<preference name="AndroidGradlePluginVersion" value="8.7.3" />
<preference name="GradleVersion" value="8.9" />
<config-file target="app/src/main/res/values/themes.xml"
parent="/resources/style[@name='Theme.App.SplashScreen']">
<item name="android:windowOptOutEdgeToEdgeEnforcement"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="35">true</item>
</config-file>
</platform>
```
Whether the `AndroidGradlePluginVersion` and `GradleVersion` changes are
needed in your case would most likly depend on the version of Android Studio
you're using. During my testing, I had to upgrade. You can try building without
these preferences first and adjust accordingly based on any build errors you
encounter.
Again, this workaround would only work with Cordova-Android 13 and not
tested on anything lower.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]