Modify mobile app icon

  

Hi,


i am trying to change the icon on my mobile application, but I got this error : 

I tried to follow this guide : 

https://success.outsystems.com/Documentation/10/Delivering_Mobile_Apps/Customize_Your_Mobile_App/Modify_the_App_Icon#Icons_JSON_Template


Here is the extensibility config I set :

{
    "resources" : "MyResources.zip",
    "icons" :
    {
        "android": [{

            "resource": "/path/to/android/icon.png",

            "density": "ldpi"

        },

        {

            "resource": "/path/to/android/icon.png",

            "density": "mdpi"

        },

        {

            "resource": "/path/to/android/icon.png",

            "density": "hdpi"

        },

        {

            "resource": "/path/to/android/icon.png",

            "density": "xhdpi"

        },

        {

            "resource": "/path/to/android/icon.png",

            "density": "xxhdpi"

        },

        {

            "resource": "/path/to/android/icon.png",

            "density": "xxxhdpi"

        }]
    }
}



Thanks in advance.

Hi Tobit,

Did you set the path correctly? Is this path "/path/to/android/" correct?

Hi Joao,

Actually I also a bit confused about the path, on what basis should I put the path.

I've tried  setting 3 path, and all failed with same error message :

1.  /path/to/android/icon.png

2. /MyResources.zip/icon.png

3. /DnmMAppraisal_Mobile/MyResources.zip/icon.png


here is what in resources.zip file


You should specify the path inside the zip file. In your case is just "/icon.png".

I've changed it and now getting this error.


Hello Tobit.

Does your app build without configuring the icon through extensibility (just to make sure the issue is with the icon)?

Also, why are you using extensibility to set the application icon? If you don't do anything, the application icon will be the icon you chose for your OutSystems application



Thanks

do I need to provide all icon formats ?

means there will be 6 types of icon png files on that zip files.

César Afonso wrote:

Hello Tobit.

Does your app build without configuring the icon through extensibility (just to make sure the issue is with the icon)?

Also, why are you using extensibility to set the application icon? If you don't do anything, the application icon will be the icon you chose for your OutSystems application



Thanks


Hi Cesar,

the case is at first I dont set any icon for my app. 

Then in the middle of my dev, i want to change the apk icon to a picture, but after I upload an icon, I noticed that it also makes an error when generating apk.

Hello Tobit.

My suspicion is that the error is not related with the icon but probably some plugin you're using.

Can you try creating a clean app, use the icon and build (without plugins)? This way you can check if it's the icon or not.

Thanks

Hi Cesar,

I've tried what you suggest. The result is ok.

Now, how can I identify the real culprit?


Thanks in advance.

Hello Tobit.

The next step would be for you to remove the plugins one by one (or add them one by one in your clean app if it's easier) and see the culprit. The most common cause for an error when building an app is a plugin.

If you're using plugins that are not in the OutSystems supported plugins list, it's a good bet to start with those.

Thanks

I found a detailed article which might come in handy https://www.androidcentral.com/hate-app-icon-heres-how-change-it . It mentions how to use Awesome Icons. I guess everybody knows about it. 

Similarly, outsystems has a detailed and very useful doc https://success.outsystems.com/Documentation/10/Delivering_Mobile_Apps/Customize_Your_Mobile_App/Modify_the_App_Icon

Do check for this article on mastering few important skills in mobile app development http://www.cestarcollege.com/blog/mobile-app/skillsets-a-professional-ios-developer-must-master/

César Afonso wrote:

Hello Tobit.

The next step would be for you to remove the plugins one by one (or add them one by one in your clean app if it's easier) and see the culprit. The most common cause for an error when building an app is a plugin.

If you're using plugins that are not in the OutSystems supported plugins list, it's a good bet to start with those.

Thanks

Hi Cesar,

Now I've found the culprit. 

But what make me confused is the plugin function is working well. I've tried to re-publish the plugin, then publish it again, but still error when generating APK.


Hello Tobit.

If you're unable to generate the apk, how do you know the plugin functionality is working? What's the plugin that's causing the error?

Thanks

Hi Cesar,

So here is what happen :

1. I make an app. While I'm developing, I need some plugin that can check if the location setting on hp is on / off.

2. So I add this plugin (attached) to my app. After that I generate APK. After installing new APK and test it, everything seems fine, and the function worked.

3. After a while, I decide I want to change the icon of my APK. After I change it, I tried to build the new APK. Now it returns an error like what I describe above.

Solution

Hello Tobit.

The problem is that you're pointing to the head of the the master and, a couple of days ago, they commited a new version of the plugin that doesn't seem to work..

You should use a tag. In this case, change the url of the plugin in your extensibility configuration to:

https://github.com/dpa99c/cordova-diagnostic-plugin.git#3.6.4 (previous version)


Here's more info: Section Guidelines to create a plugin, from the KB article Create a plugin

Let me know if it works

Thanks

Solution

Hi Cesar,

tq very much, it works now.