Skip to content

Frequently Asked Questions

Elvin (Tharindu) Thudugala edited this page Jun 5, 2024 · 13 revisions

Scheduled Local Notifications are not shown for short periods

When setting the repeat interval for very short periods, please make sure switch Battery Optimizations and Power usage Optimizations #251

[Android] Scheduled Local Notifications are not shown on time

It is by design. #37

Cannot access ListenableFuture

Please look at #27. Issue is fixed in VS 16.2.1 (Xamarin.Android 9.4.1.0)

Enabling D8 causes Build to fail.

It's a Xamarin.Android Bug https://github.com/xamarin/AndroidSupportComponents/issues/168

Could not install package 'Plugin.LocalNotification'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111'

Only support .Net Standard 2, does not support Xamarin PCL.

No alert sound or ring when the notification appears

Check your device settings like 'Vibration intensity' and 'Notification volume'. In iOS, the sound is only played when the app is not in the foreground.

What happens when notification Id is same for 2 notifications shown at the same time?

Your second notification with the same notification id will replace the first one. Use different number ranges if you want to see 2 notifications at the same time. Prefix notification id.

Do I need to cancel notifications?

No. But in Android, if you set the NotificationRequest.Android.AutoCancel to false then you have to cancel it manually.

[Plugin.LocalNotification] No platform plugin found. Did you install the nuget package in your app project as well?

Set Android Target Framework to Android 12+

Error CS0117: 'NotificationCenter' does not contain a definition for 'NotifyNotificationTapped' (CS0117)

Set Android Target Framework to Android 12+,

Vibration pattern is ignored in Android

You can only set the vibration pattern before the channel is created.

Not working in release mode in .Net Maui

Add below code to .csproj and excludes the library from being trimmed

<ItemGroup>
    <TrimmerRootAssembly Include="Plugin.LocalNotification" RootMode="library"/>
</ItemGroup>
Clone this wiki locally