cordova - PhoneGap Build Android Not Displaying Splashscreen -




here code in config.xml that's relative splash screens:

    <splash src="splash.png" />     <icon src="icon.png"/>     <preference name="splashscreen" value="screen" />     <preference name="splashscreendelay" value="10000" />     <platform name="android">         <preference name="splashscreen" value="res/screens/android/drawable-land-ldpi-screen.png" />           <splash src="res/screens/android/drawable-land-ldpi-screen.png"/>           <icon density="ldpi" src="res/icons/android/drawable-ldpi-icon.png" />         <icon density="mdpi" src="res/icons/android/drawable-mdpi-icon.png" />         <icon density="hdpi" src="res/icons/android/drawable-hdpi-icon.png" />         <icon density="xhdpi" src="res/icons/android/drawable-xhdpi-icon.png" />         <icon density="xxhdpi" src="res/icons/android/drawable-xxhdpi-icon.png" />         <icon density="xxxhdpi" src="res/icons/android/drawable-xxxhdpi-icon.png" />         <splash density="land-ldpi" src="res/screens/android/drawable-land-ldpi-screen.png" />         <splash density="land-mdpi" src="res/screens/android/drawable-land-mdpi-screen.png" />         <splash density="land-hdpi" src="res/screens/android/drawable-land-hdpi-screen.png" />         <splash density="land-xhdpi" src="res/screens/android/drawable-land-xhdpi-screen.png" />         <splash density="land-xxhdpi" src="res/screens/android/drawable-land-xxhdpi-screen.png" />         <splash density="land-xxxhdpi" src="res/screens/android/drawable-land-xxxhdpi-screen.png" />         <splash density="port-ldpi" src="res/screens/android/drawable-port-ldpi-screen.png" />         <splash density="port-mdpi" src="res/screens/android/drawable-port-mdpi-screen.png" />         <splash density="port-hdpi" src="res/screens/android/drawable-port-hdpi-screen.png" />         <splash density="port-xhdpi" src="res/screens/android/drawable-port-xhdpi-screen.png" />         <splash density="port-xxhdpi" src="res/screens/android/drawable-port-xxhdpi-screen.png" />         <splash density="port-xxxhdpi" src="res/screens/android/drawable-port-xxxhdpi-screen.png" />     </platform>     <platform name="ios">         <preference name="splashscreen" value="res/screens/ios/default-568h@2x~iphone.png" />           <splash src="res/screens/ios/default-568h@2x~iphone.png"/>           <icon height="57" platform="ios" src="res/icons/ios/icon.png" width="57" />         <icon height="114" platform="ios" src="res/icons/ios/icon@2x.png" width="114" />         <icon height="40" platform="ios" src="res/icons/ios/icon-40.png" width="40" />         <icon height="80" platform="ios" src="res/icons/ios/icon-40@2x.png" width="80" />         <icon height="50" platform="ios" src="res/icons/ios/icon-50.png" width="50" />         <icon height="100" platform="ios" src="res/icons/ios/icon-50@2x.png" width="100" />         <icon height="60" platform="ios" src="res/icons/ios/icon-60.png" width="60" />         <icon height="120" platform="ios" src="res/icons/ios/icon-60@2x.png" width="120" />         <icon height="180" platform="ios" src="res/icons/ios/icon-60@3x.png" width="180" />         <icon height="72" platform="ios" src="res/icons/ios/icon-72.png" width="72" />         <icon height="144" platform="ios" src="res/icons/ios/icon-72@2x.png" width="144" />         <icon height="76" platform="ios" src="res/icons/ios/icon-76.png" width="76" />         <icon height="152" platform="ios" src="res/icons/ios/icon-76@2x.png" width="152" />         <icon height="29" platform="ios" src="res/icons/ios/icon-small.png" width="29" />         <icon height="58" platform="ios" src="res/icons/ios/icon-small@2x.png" width="58" />         <icon height="87" platform="ios" src="res/icons/ios/icon-small@3x.png" width="87" />         <splash height="1136" platform="ios" src="res/screens/ios/default-568h@2x~iphone.png" width="640" />         <splash height="1334" platform="ios" src="res/screens/ios/default-667h.png" width="750" />         <splash height="2208" platform="ios" src="res/screens/ios/default-736h.png" width="1242" />         <splash height="1242" platform="ios" src="res/screens/ios/default-landscape-736h.png" width="2208" />         <splash height="1536" platform="ios" src="res/screens/ios/default-landscape@2x~ipad.png" width="2048" />         <splash height="768" platform="ios" src="res/screens/ios/default-landscape~ipad.png" width="1024" />         <splash height="2048" platform="ios" src="res/screens/ios/default-portrait@2x~ipad.png" width="1536" />         <splash height="1024" platform="ios" src="res/screens/ios/default-portrait~ipad.png" width="768" />         <splash height="960" platform="ios" src="res/screens/ios/default@2x~iphone.png" width="640" />         <splash height="480" platform="ios" src="res/screens/ios/default~iphone.png" width="320" />     </platform> 

on ios splash screen displayed on android nothing displayed @ all. have suggestions on how fix error? i've tried adding cordova splashscreen plugin seems crash android app on open. missing essential piece of code?

i created 1 sample , checked in device , splash screen appeared.

add plugin

cordova-plugin-splashscreen

index.html

<!doctype html> <html>   <head>     <title>splashscreen example</title>      <script type="text/javascript" charset="utf-8" src="cordova.js"></script>     <script type="text/javascript" src="js/pushnotification.js"></script>     <script type="text/javascript" src="js/index.js"></script>     <script type="text/javascript" charset="utf-8">      // wait device api libraries load     //     document.addeventlistener("deviceready", ondeviceready, false);      // device apis available     //     function ondeviceready() {         navigator.splashscreen.show();     }      </script>   </head>   <body>     <h1>example</h1>   </body> </html> 

config.xml

    <preference name="splashscreen" value="screen" />     <preference name="splashscreendelay" value="3000" />     <platform name="android">                         <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />             <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />             <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />             <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />             <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />             <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />         </platform> <plugin name="cordova-plugin-splashscreen" spec="~3.2.1" /> 

i created 1 folder named "resources" , add splash screen images , give path in config.xml file.

and it's working.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -