androidcordovasplash-screendarkmodemiui

Splash screen background turns to grey in Android App(Apache cordova) on miui (13.0.10)


I am using Apache cordova to create an app. My splash screen background is set to white however when dark mode is enabled it becomes greyish.

It is white when I change it to light mode.

config.xml

<platform name="android">
    <preference name="AndroidWindowSplashScreenAnimatedIcon" value="res/screen/android/splashscreen.png" />
    <preference name="AndroidWindowSplashScreenDuration" value="-1" /> <!-- Duration in milliseconds -->
    <preference name="SplashScreenBackgroundColor" value="#ffffff" /> <!-- Background color -->
</platform>

I am on miui 13.0.10

Ideally I want an animated icon, slightly bobbing up and down but currently it is a static image which is still not working.


Solution

  • Although it appears that there is no direct way of doing this, I used the foreground (i.e. the splashscreen with a background) of the splashscreen image as the splashcreen, with a color pallate that works regardless of if the background is black or white, which makes it look fine.