Plugin.LocalNotification icon indicating copy to clipboard operation
Plugin.LocalNotification copied to clipboard

Not working in release mode

Open ahmedHa81 opened this issue 3 years ago • 18 comments

Notification working well in debug but after release App not working ⚒

Android

  • Device: every device's

ahmedHa81 avatar Nov 29 '22 09:11 ahmedHa81

@ahmedHa81 can you please attach a sample project?

thudugala avatar Nov 29 '22 09:11 thudugala

there's an App on android https://play.google.com/store/apps/details?id=com.x4My_robot.salyalamohamd code: a a2 a3 in debug 👇 working well 1667684611833

ahmedHa81 avatar Nov 29 '22 14:11 ahmedHa81

In my case the first notification works (my app). The preceding notifications don´t get fired, but I can see them in pending notifications.

FM1973 avatar Dec 01 '22 12:12 FM1973

After a couple of days with a couple of testers I have to say... doesn´t work at all.

FM1973 avatar Dec 09 '22 15:12 FM1973

@ahmedHa81 Can you please attach a sample project?

thudugala avatar Jan 14 '23 05:01 thudugala

@ahmedHa81 Try this

Remove ticks on AOT and Trimming for Release

image

thudugala avatar Jan 15 '23 10:01 thudugala

This fix worked for me. Thanks

kerry-em-u avatar Jan 16 '23 22:01 kerry-em-u

I´m sorry. But that's not a fix. To disable AOT and Trimming will decrease an apps performance and increase it´s size.

FM1973 avatar Jan 17 '23 06:01 FM1973

Yes Fixed it , Thanks , But please take care about App performance , Thanks a gain

ahmedHa81 avatar Jan 23 '23 21:01 ahmedHa81

Trimming and AOT disable do not work on my machine and giving me this bug https://github.com/dotnet/maui/issues/7284. Any other solutions?

maniish avatar Feb 28 '23 13:02 maniish

Hello @thudugala -- thank you so much for all the work on Plugin.LocalNotification :). I have been experiencing this issue as well. The workaround does fix the issue. However, I unfortunately will need Trimming + AOT to improve performance of my application and this is blocking my app's release. Is there another solution besides disabling AOT + Trimming?

expensivecow avatar Mar 08 '23 23:03 expensivecow

Hello @thudugala -- thank you so much for all the work on Plugin.LocalNotification :). I have been experiencing this issue as well. The workaround does fix the issue. However, I unfortunately will need Trimming + AOT to improve performance of my application and this is blocking my app's release. Is there another solution besides disabling AOT + Trimming?

Thought I would just give an update on my problem. AOT actually was working fine with this library. My main issue was that I had set AndroidLinkType to "Full" in my project. AOT works for me.

expensivecow avatar Apr 18 '23 04:04 expensivecow

adding

<ItemGroup>
		<TrimmerRootAssembly Include="Plugin.LocalNotification"/>
</ItemGroup>

to my .csproj fixed the bug for me: this still allows AOT and trimming but excludes the library from being trimmed.

gotimo2 avatar Jun 26 '23 17:06 gotimo2

I'm still having problems getting notifications working in release mode... tried all the solutions above, but they tend to lead to other errors. Anyone have an updated fix?

Wigmund avatar Feb 19 '24 08:02 Wigmund