I'm trying to display splash screen using the cordova splashscreen plugin:
https://github.com/apache/cordova-plugin-splashscreen
So i added in top level config.xml file following lines:
<platform name="android">
<icon src="res/android/drawable-ldpi/ic_launcher.png" density="ldpi" />
<icon src="res/android/drawable-mdpi/ic_launcher.png" density="mdpi" />
<icon src="res/android/drawable-hdpi/ic_launcher.png" density="hdpi" />
<icon src="res/android/drawable-xhdpi/ic_launcher.png" density="xhdpi" />
<!-- you can use any density that exists in the Android project -->
<splash src="www/images/test.png" density="land-hdpi"/>
<splash src="www/images/test.png" density="land-ldpi"/>
<splash src="www/images/test.png" density="land-mdpi"/>
<splash src="www/images/test.png" density="land-xhdpi"/>
<splash src="www/images/test.png" density="port-hdpi"/>
<splash src="www/images/test.png" density="port-ldpi"/>
<splash src="www/images/test.png" density="port-mdpi"/>
<splash src="www/images/test.png" density="port-xhdpi"/>
</platform>
<platform name="ios">
<!-- images are determined by width and height. The following are supported -->
<splash src="www/images/test.png" width="320" height="480"/>
<splash src="www/images/test.png" width="640" height="960"/>
<splash src="www/images/test.png" width="768" height="1024"/>
<splash src="www/images/test.png" width="1536" height="2048"/>
<splash src="www/images/test.png" width="1024" height="768"/>
<splash src="www/images/test.png" width="2048" height="1536"/>
<splash src="www/images/test.png" width="640" height="1136"/>
<splash src="www/images/test.png" width="750" height="1334"/>
<splash src="www/images/test.png" width="1242" height="2208"/>
<splash src="www/images/test.png" width="2208" height="1242"/>
</platform>
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="20000" />
And into app.js
.run(function($ionicPlatform, $rootScope) {
$ionicPlatform.ready(function() {
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
navigator.splashscreen.show();
}
Problem is that no splash screen is displayed. I tried to find any working solution here:
But without luck.
Plugin documentation is pretty unclear.
How can i solve it please?
Many thanks for any advice.