airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
200 stars 11 forks source link

adaptive launcher icons #1900

Open EsqualiburDEV opened 2 years ago

EsqualiburDEV commented 2 years ago

Hello Would it be possible to implement support for adaptive launcher icons. Available from android 8.

https://developer.android.com/studio/write/image-asset-studio#create-adaptive

a practical tool: https://icon.kitchen/ which generates a "res" folder

How to implement it with air? If this is already done, how do we use them in the manifest?

Thank you :)

ajwfrost commented 2 years ago

We don't have native support for this in the AIR tools, but it can be done, see #1670 thanks

marchbold commented 2 years ago

That icon.kitchen looks like a good tool!

EsqualiburDEV commented 2 years ago

Thanks for the directions. But the 'res' folder containing the adaptive icons, are not integrated in the apk. I compile with intellij. And the 'resdir' tag is not interpreter after intellij. Do you know how to do it?

marchbold commented 2 years ago

Not exactly sure what is happening for you. We can use the resdir option in our app xml and it does show an error/warning but still builds without issue

Screen Shot 2022-06-01 at 9 57 43 am

What exactly is the error you are seeing or where is intellij blocking you?

EsqualiburDEV commented 2 years ago

Hello yes, that's what happens, but the icon taken into account remains the one indicated in the xml (the old way) on android 11 tablets. the 'res' folder in the apk file, contains the same number of files as without the 'resdir' option to integrate into the xml app.

marchbold commented 2 years ago

Okay, so there is no error in intellij blocking the build? It's likely that it's just not getting copied to the correct place for the packaging.

Are you passing a relative path as the resdir? We have found the simplest way to get it working is to add the res dir to the assets that are packaged with the app in the module settings. This results in the res dir being copied to the same location as the packaged swf and app xml and seems to work.

EsqualiburDEV commented 2 years ago

Hello Sorry for the delay in response. Yes, I positioned the files as in the example given. I don't understand why it doesn't take them into account.

marchbold commented 2 years ago

Did you add them to the list of assets packaged with the android build though? This sometimes is a needed step as intellij copies all the assets from the src to another location to perform the actual build.

EsqualiburDEV commented 2 years ago

Yes I added them. Apparently there is just the "mipmap-anydpi-v26" file which is added. But not the icons.