Cordova 11 – Splash Screen – what goes in splashscreen.xml

To generate the XML file used for the splashscreen in my cordova-android 11.0.0 application, I created a sample Android app in Android Studio and, following these instructions for adding an icon to the sample app, I specified the Foreground Layer to be an SVG file of my desired splashscreen icon. I specified the background layer to be white.
Then I copied the newly generated file MyApplication/app/src/main/res/drawable/ic_launcher_foreground.xml
into my Cordova app and renamed it resources/android/splash/splashscreen.xml.

Lastly, I updated my Cordova app’s config.xml file like so:

<platform name="android">
    <preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/splash/splashscreen.xml" />
    <preference name="AndroidWindowSplashScreenBackground" value="#FFFFFF" />
</platform>

It is probably worth noting that my icon is not animated in any way.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)