9 Replies Latest reply on Feb 5, 2017 1:19 PM by regencysoftware

    icon app not working

    BobAchgill Level 1

      Is this the correct line to add to the config.xml?  I have the icon.png in my root.

      <icon src="icon.png" />

        • 1. Re: icon app not working
          kerrishotts Adobe Community Professional

          Define "not working".

           

          Also -- for iOS you need far more icons than just one. See the PhoneGap Build documentation.

          • 2. Re: icon app not working
            Chris W. Griffith Adobe Community Professional

            That is just the start of the icon definitions that you need to include. Please see the PhoneGap Build documentation for a complete list of icons (Icons and Splash | PhoneGap Docs ). You will also need to include splash screens as well.

            • 3. Re: icon app not working
              BobAchgill Level 1

              OK I tried whats in the doc and just did the build for Android but I still do not see the app Icon that I supply show up for the app when i test on a Galaxy S7.  Here are the lines in my config.xml 

              I used http://makeappicon.com/ to make the icons so I suppose the sizes are correct.

               

              -----------------------

              <!-- Default icon if others don't work -->

              <icon src="icon.png" />

               

               

              <!-- Android specific icons -->

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

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

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

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

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

              <!-- <icon src="res/icon/android/fr-xxhdpi.png" platform="android" qualifier="fr-xxhdpi"  -->

              • 4. Re: icon app not working
                Chris W. Griffith Adobe Community Professional

                Make sure you delete the app on-device before you install the new build. Icons and splashes have been known to be cached by the system.

                 

                Also make sure you have the correct path, for PhoneGap Build, the icons still need to be within the www folder and included in the zip you send to PGB.

                • 5. Re: icon app not working
                  BobAchgill Level 1

                  I am confused... under the Icons and Splash | PhoneGap Docs  section I see a different directory structure than under this section of the doc.  App Project Structure | PhoneGap Docs

                   

                  Which one is correct for where to put icons and how to name them for PGB???...

                   

                  ADDED:

                   

                  One recommends structure of ...

                  res/icon/android/ldpi.png

                   

                  The other (requires?) structure of ...

                  www/img/ldpi.png???

                  • 6. Re: icon app not working
                    VectorP Level 4

                    If you are building with PGB, it doesn't matter. Phonegap Build only requires that index.html, config.xml and icon.png are in the root directory of the zip file (or Github structure) that you are uploading. Everything else is up to you.

                     

                    So, you may have:

                     

                    /index.html

                    /config.xml

                    /icon.png

                     

                    /otherHtmlPages/page2.html

                    /otherHtmlPages/page3.html

                     

                    /myicons/androidicons/iconmdpi.png

                    /myicons/androidicons/iconhdpi.png

                    /myicons/androidicons/iconxhdpi.png (...etc...)

                    /myicons/iosicons/icon60.png (...etc...)

                     

                    /mysplashes/androidsplashes/splashmdpi.png

                    (...etc...)

                     

                    /myCSS/stylesheet1.css

                    /myCSS/stylesheet2.css

                     

                     

                    Of course, all references in html documents and config.xml must be relative, and they should refer to the proper paths in your structure.

                    • 7. Re: icon app not working
                      BobAchgill Level 1

                      I think the biggest issue was that PGB will not recognize the icons, or app name or plugins if they are added as changes to an existing app.  Once I made a whole new app using the said data all got incorporated correctly.  I don't remember seeing that being said in the documentation... it really should be added!  Or change PGB to look for changes in the config and apply them.

                       

                      Just for completeness this is the icon structure that I used and now works according to your recommendation, Chris.

                       

                      <!-- application icons for Android -->

                      <icon src="www/img/ldpi.png" platform="android" qualifier="ldpi" />

                      <icon src="www/img/mdpi.png" platform="android" qualifier="mdpi" />

                      <icon src="www/img/hdpi.png" platform="android" qualifier="hdpi" />

                      <icon src="www/img/xhdpi.png" platform="android" qualifier="xhdpi" />

                      <icon src="www/img/xxhdpi.png" platform="android" qualifier="xxhdpi" />

                       

                      Though I tried the same over using Cordova CLi and that icon structure does not work there.  Should it??

                      • 8. Re: icon app not working
                        kerrishotts Adobe Community Professional

                        The project structures for PGB and the CLI can be different, so whether or not you could use the CLI with your project depends upon your directory structure.

                         

                        Did you have hydration enabled for your project? If so, that's the problem -- Hydration works only for changes to your HTML, CSS, and JavaScript. It is not intended for changes to your config.xml (plugins, icons, etc.)

                        • 9. Re: icon app not working
                          regencysoftware

                          I found the same issue when I build with the current version the Launcher Icons are white PNGs. I had to go back to cli-6.1.0