Open Klowner opened 1 year ago
@Klowner I haven't reviewed the code yet, but have a comment about the output. The icon's type is changed from string to object, that brings a break-change to this library. Maybe store the adaptive icon output to a new key like adaptiveIcons
is better. In addition, could you provide a package with adaptive icon for testing?
Thank you for the feedback, @chenquincy.
I've changed it so the adaptive icons are exposed via {adaptiveIcons: {}}
rather than reusing {icon}
.
Here's an example apk containing adaptive icon specification (this example only contains a "foreground" image). adaptive-icon-example.zip (Change extension from .zip to .apk)
This change adds support for Android adaptive icons as discussed in #91.
If
application.icon
is an XML resource, it is assumed to be an adaptive icon file. The individual components are parsed from it and assigned toapkInfo
in the format:If any of foreground, background, or monochrome are not present in the XML or cannot be mapped to valid resources, those keys are omitted from the result object.
Please feel free to request any modifications! Thank you! -Mark