Splash Screen Android 12


I’m trying to compile an old app in Android 12, all the plugins works but I cannot find info about how to configure the splash screen. I have defined my own splash screen but when the app is compiled i have the standard cordova splash screen instead the splash defined.

Have you any example about how it works?


I’m using
cordova-plugin-splashscreen version ~6.0.2
and defined:

<preference name="SplashScreenDelay" value="2000" />
<preference name="AutoHideSplashScreen" value="true" />

Here is what Cordova has to say:


Here’s another article:

The solution is easy. Add these lines to your config.xml:

<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/splashTemplate.png" />
<preference name="AndroidWindowSplashScreenBackground" value="#000000" />

The first line tells Android 12 where to find the splash screen image. The path in this example is consistent with how your project will be set up if VoltBuilder is generating splashscreens and icons automatically. If you are not doing that, you need a path to an image which is 2732x2732.

The second line sets the background colour for parts of the screen which are not covered by the image. The default is white: the second line changes it to black.

This is the simplest solution. There are a number of options - start with the Cordova docs to learn more.