I will definitely check that out. I don’t do anything special with my build hooks, in fact I don’t use them at all… The fact is that the Splashscreen plugin does need to be updated to work the same on Android as it does on iOS, but your blog post may still be very helpful until I can find the time to update the plugin. (Which might not be for a while)
So this also works with .9.png files? I had no problems with regular PNGs, but images that aren’t 9-patch run the risk of being displayed improperly (and in a very ugly way).
I also have faced the same situation and found this setting works.
My environment is below.
Cordova, IONIC in Visual Studio 2015
cordova-plugin-splashscreen" version=“4.0.0” installed via Visual Studio (config.xml)
You need the followings. 1)config.xml
<plugin name="cordova-plugin-splashscreen" version="4.0.0" /> <platform name="android"> <!-- you can use any density that exists in the Android project --> <splash src="platforms/android/res/drawable/screen.png" density="hdpi" /> </platform> <preference name="SplashScreen" value="screen" /> <preference name="SplashScreenDelay" value="10000" /> <preference name="AutoHideSplashScreen" value="true" /> <preference name="SplashMaintainAspectRatio" value="true" />
a) The important point is that you must set the “src” as “platforms/android/res/drawable/”
->I created this folder under www, so if you see the visual studio project, the directory looks like this.
->www/platforms/android/res/drawable/
(In my case if I change the folder name, splash screen does not activate)
b)file name must include the word, “screen.”
->In my case, I set the name as “screen.png”
In the cordova project, file name is written as “splash-land-hdpi.png”, but this does not work.
If you look into the “SplashScreen.java (This file is in cordova-plugin-splashscreen folder)”, you can see that the program only deals with the word “screen” (not “splash”)