

Public class BootReceiver : BroadcastReceiver Public static AndroidNotificationManager Instance )] Public event EventHandler NotificationReceived Public const string MessageKey = "message" Public class AndroidNotificationManager : INotificationManagerĬonst string channelDescription = "The default channel for notifications." If (absTotalSeconds > 59 & absTotalSeconds Var absTotalSeconds = Math.Abs(timeSpan.TotalSeconds) Var timeSpan = DateTime.Now - NotificationDateTime.GetDailyNotificationDateTime() * Disabled on to see if this helps notifications.

this handles cases where the user changes the notification time multiple times. do not show notification if it is not time based on the settings time value. If (!Settings.DailyNotificationEnabled) return Public override void OnReceive(Context context, Intent intent) Public class AlarmHandler : BroadcastReceiver Label = "Local Notifications Broadcast Receiver")] I used this doc to setup local notifications: Essentially, if debugging, the app needs to be reopened after closing it so that the receiver is called. I have tripled checked everything and feel like something small is missing.Įdit: I think I have it worked out for notifications on the app being closed thanks to this thread: Broadcast receiver not working when app is closed. There is a RECEIVE_BOOT_COMPLETED BroadcastReceiver but I do not know if it is firing on reboot. If I reboot the notification does not show. The local notification shows every time the app is in the foreground or open. I am having trouble with local notification on Android using Xamarin.
