apache / cordova-android

Apache Cordova Android
https://cordova.apache.org/
Apache License 2.0
3.59k stars 1.52k forks source link

How to disable and completely remove splashscreen from android 12 ? #1617

Closed kat0d closed 11 months ago

kat0d commented 11 months ago

In my config I had try <preference name="SplashScreen" value="none"/> and <preference name="ShowSplashScreen" value="false" /> and <preference name="SplashScreenDelay" value="0"/> and nothing of these does not disable splashscreen.

and why in build gradle file this ...feature... is by default ? I don't need it, because I use adMob appOpen ad for this purposes.

and seems, my url start loading only after splashscreen is gone. not in async. at the and I have: splash gone, and black screen while url loading. Does anybody use it at all ?

breautek commented 11 months ago

Google doesn't allow you to completely remove the splashscreen.

On API 31 and later devices, a splashscreen always exists. If a splashscreen is not explicitly configured, those devices will show a splashscreen with your app icon as the splashscreen icon, which may not look right depending on your icon asset.

For API 30 and earlier devices, Google provides a compatibility package to bring the API 31 splashscreen system to older devices which Cordova uses for a consistent behaviour across all devices.

If you want the ability to not have a splashscreen, you'll have to make a feature request on android development unfortunately.

If it's critical not to have a splashscreen, cordova-android@10 doesn't use the splashscreen compatibility, so you can use that to not have a splashscreen, but that will only work on API 30 and lower. On API 31+ you'll get the native system splashscreen, even without the splashscreen plugin, so the max SDK will have to be API 30. You'd also need to make the necessary adjustments for target API 33 support.

Closing as not a bug.

Duplicate: https://github.com/apache/cordova/discussions/401