Closed mars-lan closed 3 years ago
I don't think there is a difference in how the library builds between development and production but I have certainly seen a difference in how assets are packed (or "shrunk" out) on Android in production. Not sure if you've seen this but I basically don't tweet ever and was shocked enough to note this gotcha, could apply: https://twitter.com/fastsquatch/status/1196475279688028160 (in 3 parts).
@mikehardy Wow TIL. I assume this only applies to "local images" (required in JS land)? I did try to use Android native drawables in largeIcon
and the result was the same. Let's see if @helenaford can reproduce this from her end.
I believe it can apply to any resources that the shrinker can't tell you are using. I think I put in there (or it's in the related link) how to do diagnostics to see what exactly is included. Alternatively you can try just turning off resource shrinking in production builds temporarily (or verifying it's disabled) as a quick check to eliminate the possibility. If I see resource missing / not displayed in production but works in debug on Android now, this is my first hunch basically.
@mikehardy thanks for the info. I tried disabling the shrinker explicitly by setting shrinkResources false
in my build.gradle
. Also verified that the image was indeed packaged into the final apk (res/drawable-mdpi-v4/image.png
). Yet still hitting the same bug only for 1.5.0.
Thank you very much for verifying - I'm quite surprised by that result but that's why we test vs assume. On the pile for triage it goes :-)
Fix pushed up in release v1.6.0. There was a problem with the license manager in v1.5.0 that we resolved here.
which was my error originally - typically I work on fully open products and I'm not used to there being other differences (like licensing) between debug and prod so I was way off on that one. Thanks for helping troubleshoot this @mars-lan
Thanks for the quick fix, @mikehardy & @helenaford . Can confirm that the issue has been fixed in 1.6.0.
There seems to a bug introduced in 1.5.0 that causes notifications to not show when
android.largeIcon
is set. The strangest thing is that this happens only in production build. Debug build shows notifications as expected. Here's the canonical app to reproduce it.This seems to affect all Android versions. My suspicion is that there's something wrong with the production build of the library. Downgrading to 1.4.0 fixes the problem reliably.