4 Replies Latest reply on Nov 12, 2016 1:42 PM by a70641379

    a working version of a splashscreen plugin

    a70641379 Level 1

      Hello,

       

      There are at least 3 topics in this forum about the splashscreen plugin not working when building with phonegap to android.

       

      All seems not answered.

       

      So instead of going back and forth with me posting the config.xml and the folder hierarchy, can you simply direct me to a git repositry with a working version of a spalsh image ? I can take it from there by bisecting it.

       

      And yes, GitHub - phonegap/phonegap-template-hello-world: PhoneGap Hello World app , doesn't show any splash in the start AFAIS. I've put a delay of 30000 to see the image of the splash as it is configured - and nothing. Runs straight to index.html.

       

      Please Help..

       

      Thanks,

        • 1. Re: a working version of a splashscreen plugin
          VectorP Level 4

          That template is OK (albeit a bit outdated), as long as you zip up the CONTENTS of the /www directory only!

           

          EDIT: no, it's not quite OK, since the paths to the icons and splashes start with 'www/', which is wrong. Omit that part.

          Also, add the necessary preferences as described in the splashscreen plugin.

          1 person found this helpful
          • 2. Re: a working version of a splashscreen plugin
            a70641379 Level 1

            Nope - doesn't work.

             

            Here is the .zip file i've just upload to phone gap:  http://www.filedropper.com/www_7

             

            As you said, two changes :

            1. I've only ziped the CONTENTS of the /www folder (as you can see - without the www folder path.

            2. Replaced any www/res/ with res/

             

            Any idea what is wrong ?

             

            Btw, didn't mentioned it before, with my source base + 'phonegap run android' splash works perfectly!

            • 3. Re: a working version of a splashscreen plugin
              VectorP Level 4

              If your splashes display on iOS and not on Android, the problem is in your config: you are using the 'density' attribute for compound quaifiers, which is not correct. Use the 'qualifier' attribute instead; see the Icons and Splashes section of the PGB Docs.

               

              For iOS, please note that you are missing several splashes. For instance, there are no landscape versions for 1136x640 and 1334x750

               

              Also, please note that you need to supply preferences as described in the splashscreen plugin's docs.

              • 4. Re: a working version of a splashscreen plugin
                a70641379 Level 1

                So,

                 

                I found one working version and bisected from there.. (bisected a lot )

                 

                I found the following changes to the Android platform (never tested iOS) of GitHub - phonegap/phonegap-template-hello-world: PhoneGap Hello World app  are mandatory:

                1. The "<splash>" "dansity=" attribute must be changed to 'qualifier' .
                2. One must add following to the config.xml : "<splash src="splash.png" /> ". Without it NO splash image will show only a black screen.
                3. One must add a 'splash.png' near the config.xml file (I've just C&P one of the other screens but maybe it can be ok to use a much less costly image).

                 

                My config snippet:

                 

                <plugin name="cordova-plugin-splashscreen"        source="npm" spec="~3.2.1" />

                 

                <splash src="splash.png" /> 

                <platform name="android">

                        <icon qualifier="ldpi" src="res/icon/android/drawable-ldpi-icon.png" />

                        <icon qualifier="mdpi" src="res/icon/android/drawable-mdpi-icon.png" />

                        <icon qualifier="hdpi" src="res/icon/android/drawable-hdpi-icon.png" />

                        <icon qualifier="xhdpi" src="res/icon/android/drawable-xhdpi-icon.png" />

                        <icon qualifier="xxhdpi" src="res/icon/android/drawable-xxhdpi-icon.png" />

                        <icon qualifier="xxxhdpi" src="res/icon/android/drawable-xxxhdpi-icon.png" />

                 

                        <splash qualifier="port-xxxhdpi" src="res/screen/android/drawable-port-xxxhdpi-screen.png" />

                          <splash qualifier="port-xxhdpi" src="res/screen/android/drawable-port-xxhdpi-screen.png" />

                          <splash qualifier="port-xhdpi" src="res/screen/android/drawable-port-xhdpi-screen.png" />

                          <splash qualifier="port-hdpi" src="res/screen/android/drawable-port-hdpi-screen.png" />

                         <splash qualifier="port-mdpi" src="res/screen/android/drawable-port-mdpi-screen.png" />

                          <splash qualifier="port-ldpi" src="res/screen/android/drawable-port-ldpi-screen.png" />

                    </platform>

                 

                 

                I Wonder if some one can push the changes to the hello world template. I'm sure that will save other some valuable time!

                1 person found this helpful