Replies: 1 comment 1 reply
-
Good point. Last week, I was trying to find out what build properties work best for release builds. I‘ll update the sample app as soon as I have the ideal combination of build attributes. Thanks for raising this! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not publishing it as an issue as I don't think it's this plugin that's causing the problem.
It's taken me a few months to gather the confidence to think this bug is somewhere in the Android MAUI framework or Android bindings.
The biggest problem: Push notifications don't arrive when app is in foreground, when app built is in Release mode, with PublishTrimmed set to on, which is the default. Turning on AOT also automatically turns on PublishTrimmed, which is also on by default.
For details please see the issue I created here (because JonathanPeppers suggested .net 9 would fix all trimming problems)
dotnet/android#8940
In short: Only when the Release-built application is in background, when a non-data message is sent (i.e. via the firebase console) it will appear. I'm guessing this is where some confusion and miscommunication lies.
Here's the Plugin.Firebase issue (which assumes AOT is the problem)
TobiasBuchholz/Plugin.Firebase#258
And I'm also pretty sure Shiny (an alternative library) is affected too as I couldn't get that to behave differently either.
@thomasgalliker maybe you can shed your light on this? And if confirmed, mention it somewhere in the documentation? It's taken me weeks to find a workaround (turning off trimming and aot), I can only imagine this will puzzle other Android developers too when they're finally ready to publish to the store (publish = build in release mode)
I hope that together we can find a solution for this issue. To me it's not that it's not working, just that it's so hard to nail down and not mentioned as a known issue anywhere on github.
The ONLY thing I couldn't test is building it on a Mac :D. But that would be really odd if it were the case.
Beta Was this translation helpful? Give feedback.
All reactions