Reputation:
How to avoid the dark grey background which will flash for a second before the splash screen appears in android app built by Cordova ?
Upvotes: 0
Views: 1632
Reputation: 1
For some reason the plugin 'cordova-plugin-android-window-background' didn't work for me, it closes the application.
This solution provided by @Nsamba Isaac worked like a charm on my phone right now
https://stackoverflow.com/a/72063894/5961202
Upvotes: 0
Reputation:
This is a simple plugin for Android which will set the window background color for you app's MainActivity to a color of your choice. This allows you to avoid the standard dark grey background which will flash for a second before your splash screen appears. Set the color to the same background as your splash screen for a smoother start-up effect.
cordova plugin add cordova-plugin-android-window-background --variable WINDOW_BACKGROUND_COLOR=#ff69b4 --save
add this to your config.xml file:
<plugin name="cordova-plugin-window-background">
<variable name="WINDOW_BACKGROUND_COLOR" value="#B4D455" />
</plugin>
for more info visit : https://github.com/winteragency/cordova-plugin-android-window-background
Upvotes: 1