10 Replies Latest reply on Aug 11, 2016 8:24 AM by davids81255913

    Default Icon not getting replaced on device

    davids81255913 Level 1

      I'm building my app via Phone Gap Build (cli-6.3.0), and I cannot seem to get my custom icon to replace the default icon (stock cordova icon) that appears on the device (android) once installed. My config.xml contains the following entry:

       

      <icon src="icon.png" />

       

      In my folder structure, the above noted icon.png is in my root directory, along with the config.xml and index.html.

       

      I have read through past discussions dealing with this topic, as well as the phone gap docs, and I cannot seem to determine the cause. Any resolved issues seemed to be related to issues that don't appear to apply to my case (incorrect folder structure, matching case between config value and directory name, etc.).

       

      I should add that the icon "does" appear on the build site...

       

       

      What do I need to do in order for my custom icon to appear on an android device after installation, rather than the default icon?

       

      Thanks in advance!

        • 1. Re: Default Icon not getting replaced on device
          kerrishotts Adobe Community Professional

          Please share your config.xml file in its entirety (minus identifying/secret information you don't want public) so we can take a look. Thx!

          • 2. Re: Default Icon not getting replaced on device
            davids81255913 Level 1

            Thanks very much for your response Kerri!! I'm really looking forward to getting this figured out!!

             

            <?xml version='1.0' encoding='utf-8'?>

            <widget id="com.app.app" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

              <name>AppName</name>

              <description>

                App Description

              </description>

              <author email="" href="">

                App Author

              </author>

              <content src="index.html" />

             

             

              <!-- XHRS (SEE CSP)-->

               

              <!-- NAVIGATION -->

              <allow-navigation href="*" />

               

              <!-- INTENTS --> 

              <allow-intent href="*" /> 

             

             

              <icon src="icon.png" />

             

             

              <platform name="android">

                <preference name="SplashScreen" value="splash" />   

                <preference name="SplashScreenDelay" value="10000" />

                <preference name="SplashShowOnlyFirstTime" value="false" />

                <splash src="splash.png" />   

                <icon src="\images\favourite.png" />

                <icon src="\images\map.png" />

                <icon src="\images\marker.gif" />

                <icon src="\images\nav.png" />

                <icon src="\images\follow_user.png" />

                <icon src="\images\location.png" />

                <icon src="\images\change.png" />

                <icon src="\images\lock.png" />

                <icon src="\images\events.png" />

                <icon src="\images\statistics.png" />

                <icon src="\images\upload.png" />

                <icon src="\images\user.png" />

                <icon src="\images\settings.png" />

                <icon src="\images\comments.png" />

                <icon src="\images\clouds.png" />

                <icon src="\images\arrow-left.png" />

                <icon src="\images\arrow-right.png" />

                <icon src="\images\loginArrow.png" />

                <icon src="\images\mail.png" />

                <icon src="\images\mail-hover.png" />

                <icon src="\images\invites.png" />

                <icon src="\images\events-hover.png" />

                <icon src="\images\settings-hover.png" />

                <icon src="\images\statistics-hover.png" />

                <icon src="\images\pinellas.jpg" />

              </platform>

              <platform name="ios" />

              <platform name="windows" />

              <engine name="android" spec="~5.2.1" />

              <engine name="android" spec="~4.2.0" />

              <engine name="windows" spec="~4.4.1" /> 

              <plugin name="cordova-plugin-geolocation" spec="~2.2.0" />

              <plugin name="cordova-plugin-whitelist" spec="~1.2.2" />

              <plugin name="cordova-plugin-inappbrowser" spec="~1.4.0" />

              <plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>

            </widget>

            • 3. Re: Default Icon not getting replaced on device
              VectorP Level 4

              You should use forward slashes in the paths. And the paths should not begin with a slash.

               

              Also: set the Android icons for a specific density/qualifier. I assume your icons are images for your app, not Android system icons.

              You must at least have the required iOS splashes and icons.

              You can't use the 'engine' elements

              • 4. Re: Default Icon not getting replaced on device
                davids81255913 Level 1

                Thanks very much for your help!

                 

                In other words, is the absence of the density/qualifier attribute and value in the below entry what is causing my issue?

                 

                <icon src="icon.png" />

                • 5. Re: Default Icon not getting replaced on device
                  davids81255913 Level 1

                  And yes, the images noted are for the app, not android system icons.

                  • 6. Re: Default Icon not getting replaced on device
                    VectorP Level 4

                    No, most likely not. It's all the other things (paths, slashes of the non-default icons).

                    • 7. Re: Default Icon not getting replaced on device
                      davids81255913 Level 1

                      So the below should do it (even minus the density/qualifier) ?

                       

                      <?xml version='1.0' encoding='utf-8'?>

                      <widget id="com.app.app" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

                        <name>AppName</name>

                        <description>

                          App Description

                        </description>

                        <author email="" href="">

                          App Author

                        </author>

                        <content src="index.html" />

                       

                       

                        <!-- XHRS (SEE CSP)-->

                         

                        <!-- NAVIGATION -->

                        <allow-navigation href="*" />

                         

                        <!-- INTENTS --> 

                        <allow-intent href="*" /> 

                       

                       

                        <icon src="icon.png" />

                       

                       

                        <platform name="android">

                          <preference name="SplashScreen" value="splash" />   

                          <preference name="SplashScreenDelay" value="10000" />

                          <preference name="SplashShowOnlyFirstTime" value="false" />

                          <splash src="splash.png" />   

                          <icon src="images/favourite.png" />

                          <icon src="images/map.png" />

                          <icon src="images/marker.gif" />

                          <icon src="images/nav.png" />

                          <icon src="images/follow_user.png" />

                          <icon src="images/location.png" />

                          <icon src="images/change.png" />

                          <icon src="images/lock.png" />

                          <icon src="images/events.png" />

                          <icon src="images/statistics.png" />

                          <icon src="images/upload.png" />

                          <icon src="images/user.png" />

                          <icon src="images/settings.png" />

                          <icon src="images/omments.png" />

                          <icon src="images/clouds.png" />

                          <icon src="images/arrow-left.png" />

                          <icon src="images/arrow-right.png" />

                          <icon src="images/loginArrow.png" />

                          <icon src="images/mail.png" />

                          <icon src="images/mail-hover.png" />

                          <icon src="images/invites.png" />

                          <icon src="images/events-hover.png" />

                          <icon src="images/settings-hover.png" />

                          <icon src="images/statistics-hover.png" />

                          <icon src="images/pinellas.jpg" />

                        </platform> 

                        <plugin name="cordova-plugin-geolocation" spec="~2.2.0" />

                        <plugin name="cordova-plugin-whitelist" spec="~1.2.2" />

                        <plugin name="cordova-plugin-inappbrowser" spec="~1.4.0" />

                        <plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>

                      </widget>

                      • 8. Re: Default Icon not getting replaced on device
                        Chris W. Griffith Adobe Community Professional

                        If you want you can use ConfiGAP to assist in writing your config.xml file for PhoneGap Build. It is free from configap.com

                         

                        Chris

                        • 9. Re: Default Icon not getting replaced on device
                          VectorP Level 4

                          What are all these icons in the 'android' part? You seem to believe that you must declare all icons/images you are using in your app. However, you are supposed to specify the app icons for the various densities, only. Those are the icons that appear on the home screen of the Android OS.

                          1 person found this helpful
                          • 10. Re: Default Icon not getting replaced on device
                            davids81255913 Level 1

                            Yes, thank you! I was under the impression all images and/or icons had to be declared.That solved my issue!

                             

                            Thanks Vector!