I am developing a hybrid android mobile application using Phonegap/Cordova and Salesforce mobile SDK. I am trying to change the icon and splash screen but it is not working as expected.

Reference Link: https://cordova.apache.org/docs/en/latest/config_ref/images.html

I have update my config.xml like below,

    <preference name="SplashScreen" value="screen"/>
    <preference name="SplashScreenDelay" value="10000"/>
    <platform name="android">
        <allow-intent href="market:*" />

        <icon src="icons/icon-ldpi.png" density="ldpi" />
        <icon src="icons/icon-mdpi.png" density="mdpi" />
        <icon src="icons/icon-hdpi.png" density="hdpi" />
        <icon src="icons/icon-xhdpi.png" density="xhdpi" />

        <splash src="icons/screen-land-hdpi.png" density="land-hdpi"/>
        <splash src="icons/screen-land-ldpi.png" density="land-ldpi"/>
        <splash src="icons/screen-land-mdpi.png" density="land-mdpi"/>
        <splash src="icons/screen-land-xhdpi.png" density="land-xhdpi"/>

        <splash src="icons/screen-port-hdpi.png" density="port-hdpi"/>
        <splash src="icons/screen-port-ldpi.png" density="port-ldpi"/>
        <splash src="icons/screen-port-mdpi.png" density="port-mdpi"/>
        <splash src="icons/screen-port-xhdpi.png" density="port-xhdpi"/>

When I emulate the application, the config.xml (in platforms/android/res/) is updating accordingly. But nothing seems to be working and I still see Salesforce icon which looks like below,

enter image description here

Any idea why it is not working?


I have solution about icon. You have to rename your icon image as 'sf__icon.png' and paste that file to all the resource folders. Then just run your project. The icon image will be changed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.