Ionic-cli: feat: make `ionic cordova resources` comply with Android O adaptive icons

Created on 25 Apr 2017  Â·  27Comments  Â·  Source: ionic-team/ionic-cli

Hello. This is a feature request for _Android O - Adaptive icons_ integration with the ionic-cli.

Make the ionic resources cli command able to add the necessary information and convert an extra background file or extract an background layer from a .psd file to be able to use the new Adaptive icons in Android O.

enhancement help wanted

Most helpful comment

Could everyone stop writing +1? Just add a "thumbs up" reaction if you think this issue is relevant

All 27 comments

Hi, I really would love to see this feature. Is this already on the roadmap?

Hey guys, just backing up these claims. Would really appreciate this so my icon looks great with the pixel and pixel 2.

screen shot 2017-11-29 at 2 15 21 pm

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

Could everyone stop writing +1? Just add a "thumbs up" reaction if you think this issue is relevant

Agreed--keep in mind new replies (even +1s) email all subscribers.

I'll leave my thoughts about adaptive icons for Cordova:

I understand the Ionic CLI has been falling behind in this case. Even with almost a year old issue I still haven't gotten around to adding this feature. We don't have a "roadmap", but we do use milestones, to a degree: https://github.com/ionic-team/ionic-cli/milestones

The ionic cordova resources command uploads source images to Ionic servers, converting and downloading them real-time. Up until adaptive icons, the only operations on these source images have been resize and maybe crop. There's also only been one input image. Adaptive icons require two input images, unless a solid color is used for the back layer. They also require direct edits to the XML (Cordova doesn't have this feature built-in like the other resources). It's an entirely new type of icon that caught me off guard. Couple these realities with the fact that I'm not sure what the future of ionic cordova resources is: will it become a much more reliable paid service for Ionic Pro? will there be a local version in the CLI that does the image manipulations? I will be discussing it with my colleagues soon.

We must also keep in mind the onset of Capacitor with the Ionic CLI. In Capacitor, the scope of native configuration is minuscule compared to Cordova. This wouldn't even be an issue. Android Studio has a GUI for Adaptive Icons, and that's what you'd use in Capacitor projects.

So I'm personally still unclear about where this issue will go. For now, I'll keep it in the "Future" milestone, and I'll reply back when I have more info.

@thielCole Can you please explain to me how you achieve adaptive icon?

Did you create a separate icon (png) file? Or some other way helps you to accomplish it.

Thanks in advanced.

+1

+1

+1

+1

We are past a year on this request, and we're on to Android Pie now. Any chance this could get assigned?

This PR in cordova-android will introduce a new syntax for adaptive icons: https://github.com/apache/cordova-android/pull/448

+1

Little update: our cordova-res utility now supports Android Adaptive Icons. It will also generate the config.xml syntax necessary for Cordova (support for which was recently added, so you will need latest Cordova and latest cordova-android).

cordova-res is becoming the default utility for generating Cordova resources in Ionic CLI 5.0.0, so this issue will be closed when 5.0.0 is released. See https://github.com/ionic-team/ionic-cli/issues/3915.

Feel free to create issues in the cordova-res repo or reply here. Looking forward to some feedback!

Hi @dwieeb that looks awesome. I can see you included an option to set a color for the background, could you also make it possible to set a color for the foreground if it is a png with alpha channel?

@eikooc Is there a link to some documentation you could send me? As long as Cordova supports it, I feel comfortable supporting it as well in cordova-res.

✨ Ionic CLI 5 is out! ✨

The default for ionic cordova resources is now to use the cordova-res utility, which supports Android adaptive icons. Feels good to finally be able to close this issue. 😄

There is an issue for improving the documentation for this (I realize it's a bit lacking): https://github.com/ionic-team/ionic-docs/issues/721

Please give the new CLI a try! Leave feedback/bug reports in either repo. Thanks!

Was this page helpful?
0 / 5 - 0 ratings