Closed dylmye closed 1 month ago
Hey, thank you for opening an issue here! It would be nice to add Android support. I will read through the docs and try to implement it. Or, If you feel like this could be a nice weekend project for you, I would be more than grateful to review your PR! :)
Definitely looks good - from analysing popular apps that implement this functionality it seems like that's the most common way of doing it!
I'll see if I can find some spare time but I don't have a lot of experience with developing config plugins :)
Definitely looks good - from analysing popular apps that implement this functionality it seems like that's the most common way of doing it!
I'll see if I can find some spare time but I don't have a lot of experience with developing config plugins :)
No worries! I am going to start working on that. I will keep you posted about the progress.
great job for ios support! looking forward to see android one as well. Thank you for efforts.
The work is in progress. So far no struggles. The module API will remain the same. There is a branch.
Any progress report?, since there haven't been any commits in a while, this lib is the only properly maintained one that is designed with expo in mind
Any progress report?, since there haven't been any commits in a while, this lib is the only properly maintained one that is designed with expo in mind
Thanks for checking this library! Unfortunately, I was not able to proceed with this issue. Regarding the timeline, I want to release this feature until 15.5.2024. Stay tuned! 💪
If we can help at all, please let us know how :)
Status update Today I was able to change the app icon on the Android! 🎉 Now I need to polish the code and start working on the config plugins.
Status update The key part of AndroidManifest can be updated with Config Plugins. 🎉 Now, I am seeking how to reuse an existing Config Plugin for asset generation: https://github.com/expo/expo/blob/3f2a537ad63b231e527aa7206ce8d271e91a2e84/packages/%40expo/prebuild-config/src/plugins/icons/withAndroidIcons.ts#L39
Petr you're a legend :D
true and real
Sorry guys I did not make any progress in the past few days. What I need to do next, is to design the config plugin API, because the current one is not sufficient for the Android Adaptive Icons, see: https://docs.expo.dev/versions/latest/config/app/#adaptiveicon. Most likely I am going to copy the API of the Expo app.json.
Been awhile since the last real commit here, and it sounds like you were 90% the way to the finish line! You have a ton of dependabot commits failing because of an expired github token too. Are you planning on continuing with this project? It's the only managed expo plugin that actually works for ios, and hopefully with some effort, android too!
@SaintNick1214 The short answer is yes! Dependabot issues have been resolved. The aim is to add Android support asap. Mr. @riccardo-welld has offered me help with this and he is already pushing some commits!
Hi all, I am working on the integration of adaptive icons on Android and will add the developed features as soon as possible.
I will not use the @riccardo-welld account, but this one.
Some clarifications: the current developments involve the use of adaptive icons only, so there will not be the possibility to use a single image for now.
Also at the moment there is a lot of copy-pasted code from the original Expo repository. I hope in the future to be able to reduce the duplication and be able to use utilities that are not currently exported from the original Expo repository.
I introduce a breaking change in the plugin props type. Now you can define the alternate icons as follows:
[
"../app.plugin.js",
[
{
"name": "IconA",
"ios": "./assets/icon-a.png",
"android": {
"foregroundImage": "./assets/icon-a-foreground.png",
"backgroundColor": "#001413"
}
},
{
"name": "IconB",
"ios": "./assets/icon-b.png",
"android": {
"foregroundImage": "./assets/icon-b-foreground.png",
"backgroundColor": "#001413"
}
},
{
"name": "IconC",
"ios": "./assets/icon-c.png",
"android": {
"foregroundImage": "./assets/icon-c-foreground.png",
"backgroundColor": "#001413"
}
}
]
]
I introduce a breaking change in the plugin props type. Now you can define the alternate icons as follows:
[ "../app.plugin.js", [ { "name": "IconA", "ios": "./assets/icon-a.png", "android": { "foregroundImage": "./assets/icon-a-foreground.png", "backgroundColor": "#001413" } }, { "name": "IconB", "ios": "./assets/icon-b.png", "android": { "foregroundImage": "./assets/icon-b-foreground.png", "backgroundColor": "#001413" } }, { "name": "IconC", "ios": "./assets/icon-c.png", "android": { "foregroundImage": "./assets/icon-c-foreground.png", "backgroundColor": "#001413" } } ] ]
I got your point! This change of API is necessary because of the Android support.
Do you think, that It would be possible to keep the existing API functional for a few releases? I am thinking about the ones who are using this package only on iOS. This also can be solved by throwing a clear error with migration instructions.
Also, the docs have to be updated and I can help you with that.
I believe we can maintain backward compatibility by using a union type that allows icons to be specified either as simple strings (the path) or as objects of type AlternateIcon
.
This would require some further development, but might make it easier for older users.
When the old approach is used, no icons are generated on Android.
In later development, the simple path array could be handled on Android as well, to generate a nonadaptive icon.
The 1.0.0 with Android support has been released! 🎉 Big kudos to @INDAPP 👏
Thank you @pchalupa @INDAPP !! This is massive for all expo developers!
Thanks for the awesome package! We see that this functionality is possible on Android too with some Android Manifest tweaking. Would it be possible to add support for this in this library? Or would you be willing to take a PR for this? :)