Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

["SDK Assemblies Only" linking] Setted Android icon not showing on future notifications + future notifications don't appear at all #70

Closed
agharium opened this issue Jan 28, 2020 · 6 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@agharium
Copy link

agharium commented Jan 28, 2020

Describe the bug
The setted icon is only used in notifications when app is running in debug mode or in release mode with linking option set to none.
In that last case, it uses the launcher icon instead of the icon set in the notification options. Also, this only happens when NotifyTime is set to future. I tested it with a past DateTime and it didn't appeared any notification. I believe this is expected behavior. Instant notifications works just fine.

To Reproduce
Steps to reproduce the behavior:

  1. Set a notification with an icon and also set a launcher icon on the android project and a future NotifyTime.
  2. Set linking option to "SDK Assemblies Only" in release mode.
  3. Run app in release mode.
  4. Future notifications shows up with the app launcher icon instead of the originally setted icon on code.

IconSample.zip

Expected behavior
Future notification shown with the selected notification icon of when it was setted on code.

Screenshots
screenshot-2020-01-27_22 37 58 446
☝️ Android 9: blank round icon because android expects a entirely white icon, and that's not the launcher icon case.

WhatsApp Image 2020-01-28 at 09 04 09
☝️ Android 8: actually shows launcher entirelly instead of setted icon on the notification.

Platform (please complete the following information):

  • OS: Android
  • Target version: 10

Smartphone (please complete the following information):

  • Device: Genymotion emulator and Samsung A5 2017
  • OS: Android
  • Version: 9 and 8 respectively

Additional context
I bet the other issue that I had (#63) is probably happening because of that and I see that #69 may have some similarity as well. The issue at #58 may also have some similarity with this "only works without any linking set" thing and such.

This also is the reason that another project of mine (my main one atm) is actually not showing notifications when NotifyTime is set. I just disabled linking and it's working flawlessly. It soon needs to go into production, so I just gotta deal with the big apk size. If you have any idea of what's going on, it would help a lot.

Thanks for the plugin, see you guys.

@agharium agharium added the bug Something isn't working label Jan 28, 2020
@thudugala
Copy link
Owner

Hi @agharium thanks for the detailed bug. Can you please attach your sample project?

@agharium agharium changed the title ["only sdk assemblies" linking] Setted Android icon not showing on future notifications + future notifications doesn't appear ["SDK Assemblies Only" linking] Setted Android icon not showing on future notifications + future notifications don't appear at all Jan 28, 2020
@agharium
Copy link
Author

agharium commented Jan 28, 2020

Hi @agharium thanks for the detailed bug. Can you please attach your sample project?

Added sample project, an extra screenshot and rewrote some of the issue. When I first wrote it, I was almost falling asleep.

And, just for future reference, one only needs to delete bin and obj project folders to decrease a Xamarin Forms solution size drastically enough to zip it and send it on a GitHub issue 😄. That's the reason I didn't send the sample before hahah

@thudugala
Copy link
Owner

@agharium No solution found yet.
The issue is that System.Xml.Serialization.XmlSerializer Deserialize and Serialize methods ignore object property "Android" when linking option set to "SDK Assemblies Only".

@agharium
Copy link
Author

agharium commented Feb 5, 2020

not even a workaround? besides turning off "SDK Assemblies Only" linking.

@thudugala
Copy link
Owner

thudugala commented Feb 5, 2020

I tried setting Skip Linking assemblies to System.Xml;System.Xml.XmlSerializer;System.Xml.Serialization. But did not work.

Also Tried using System.Text.Json Json JsonSerializer. Serialize works but Deserialize did not work.

@thudugala thudugala added the help wanted Extra attention is needed label Feb 14, 2020
@thudugala
Copy link
Owner

@agharium try v5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants