Tested on a Pixel XL with Android 8.1
https://github.com/signalapp/Signal-Android/issues/6511 should be reopened.
It looks like this will only work for targetSdk 26+, which is not going to happen for a while. We can revisit once we're at that API level, but feel free to reopen if I've missed something and there's a way to do this at our current targetSdk. Thanks!
@moxie0 this could become a problem, Google is requiring apps to target at least 26 starting November. See https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
@Stanzilla Thanks, good to know
Hi @moxie0,
An application does not have to set targetSdk to 26, however, it must be compiled with at least SDK 26 (which Signal is 🎉 ). In fact, Google Developer Advocate Ian Lake summarizes this in a blog post
Note: you do not need to target API 26 to provide an adaptive icon — only compile against it. Users will benefit from your work even as you work through other behavior changes.
I triaged this issue today and it comes down to several things.
android:roundIcon in AndroidManifest.xml. Signal defines an adaptive-icon (icon.xml) for android:icon, but not for android:roundIcon; it is always the round image (icon_circle.png), so even devices that are API 26 will only be able to load the round image. This can be solved easily with a resource alias for API 26 and higher.icon.xml is currently in drawable-v26 but _must be_ in drawable-anydpi* in order for it to be chosen over the device-specific density modifier (xhdpi, etc). 



I was able to get adaptive icons to render nicely by making changes 1 & 2, and adding a new vector drawable as the foreground layer.




However, this is the wrong icon! Notice for example that the shadows are missing. I do not know where to find a vectorized original of the current logo. Additionally, I do not have any image editing tools beyond simple SVG editors. From reading through #5936 I see that @liliakai and @iadmir were heavily involved in the logo design, and the in #6189 the new pngs were added, but I did not see a vectorized copy of the current logo anywhere.
I would like to pursue fixing this, but without the ability to create appropriately sized images, it is rather impractical for me to do so.
Related issues:
Is this helpful? https://github.com/signalapp/Signal-Design/tree/master/android/icons/app_icon
On Apr 21, 2018, at 18:53, Marius Volkhart notifications@github.com wrote:
Hi @moxie0,
An application does not have to set targetSdk to 26, however, it must be compiled with at least SDK 26 (which Signal is 🎉 ). In fact, Google Developer Advocate Ian Lake summarizes this in a blog post
Note: you do not need to target API 26 to provide an adaptive icon — only compile against it. Users will benefit from your work even as you work through other behavior changes.
I triaged this issue today and it comes down to several things.
Devices that specify the build flag declaring that they want circular icons (emulators, Pixel, etc.), will always load the value from android:roundIcon in AndroidManifest.xml. Signal defines an adaptive-icon (icon.xml) for android:icon, but not for android:roundIcon; it is always the round image (icon_circle.png), so even devices that are API 26 will only be able to load the round image. This can be solved easily with a resource alias for API 26 and higher.
The icon.xml is currently in drawable-v26 but must be in drawable-anydpi* in order for it to be chosen over the device-specific density modifier (xhdpi, etc).
The current launcher icons are not sized in a way that meets the adaptive icon requirements. This leads to rendering problems, as seen in these screenshots.I was able to get adaptive icons to render nicely by making changes 1 & 2, and adding a new vector drawable as the foreground layer.
However, this is the wrong icon! Notice for example that the shadows are missing. I do not know where to find a vectorized original of the current logo. Additionally, I do not have any image editing tools beyond simple SVG editors. From reading through #5936 I see that @liliakai and @iadmir were heavily involved in the logo design, and the in #6189 the new pngs were added, but I did not see a vectorized copy of the current logo anywhere.
I would like to pursue fixing this, but without the ability to create appropriately sized images, it is rather impractical for me to do so.
Related issues:
6511 was recently closed as part of the issue cleanup, but had previously been reopened by @moxie0. It contains discussion on the original implementation and some reports of it working incorrectly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Thanks @michaelkirk! I only looked at the raw file, not the material design file 🤦♂️ I think that's all I need
Fixed by https://github.com/signalapp/Signal-Android/pull/7867 which is in release 4.21 which is currently in beta. Not sure how you guys handle that, do you keep issues open until a release version with the fix is shipped or can I close? @moxie0 @greyson-signal
We can close it, thanks for the reminder!
Most helpful comment
Hi @moxie0,
An application does not have to set
targetSdkto26, however, it must be compiled with at least SDK 26 (which Signal is 🎉 ). In fact, Google Developer Advocate Ian Lake summarizes this in a blog postI triaged this issue today and it comes down to several things.
android:roundIconinAndroidManifest.xml. Signal defines anadaptive-icon(icon.xml) forandroid:icon, but not forandroid:roundIcon; it is always the round image (icon_circle.png), so even devices that are API 26 will only be able to load the round image. This can be solved easily with a resource alias for API 26 and higher.icon.xmlis currently indrawable-v26but _must be_ indrawable-anydpi*in order for it to be chosen over the device-specific density modifier (xhdpi, etc).I was able to get adaptive icons to render nicely by making changes 1 & 2, and adding a new vector drawable as the foreground layer.




However, this is the wrong icon! Notice for example that the shadows are missing. I do not know where to find a vectorized original of the current logo. Additionally, I do not have any image editing tools beyond simple SVG editors. From reading through #5936 I see that @liliakai and @iadmir were heavily involved in the logo design, and the in #6189 the new
pngs were added, but I did not see a vectorized copy of the current logo anywhere.I would like to pursue fixing this, but without the ability to create appropriately sized images, it is rather impractical for me to do so.
Related issues:
6511 was recently closed as part of the issue cleanup, but had previously been reopened by @moxie0. It contains discussion on the original implementation and some reports of it working incorrectly.