In my NET8MAUI, I'm using the plugin Plugin.LocalNotification. I set a notification to be repeated daily with this code:
INotificationService _notificationService;
var notifyDateTime =
DateTime.Parse($"{DateTime.Now.ToShortDateString()} 08:00:00");
var notification = new NotificationRequest
{
NotificationId = 100,
Title = AppResources.NotificationsTitle,
Description = AppResources.NotificationDescription,
CategoryType = NotificationCategoryType.Status,
Schedule =
{
NotifyTime = notifyDateTime,
RepeatType = NotificationRepeat.Daily
}
};
await _notificationService.Show(notification);
The notification is fired once and then nothing. I thought the notification would stay there until the cancellation and fired daily. Do I have to resend the notification again every time it is fired?
I added in the MauiProgram.cs the following lines
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.........
.UseLocalNotification();
For the other settings, I followed the documentation. In the AndroidManifest.xml I added the following lines
The issue I had was with the Google Play. When I submitted the app with those settings, Google rejected my app because it is not an agenda or a calendar.
I just want to give you an update. The notification is working perfectly on iOS. On Android defo it is not working and on some devices the app crashes.
In my
NET8
MAUI
, I'm using the plugin Plugin.LocalNotification. I set a notification to be repeated daily with this code:The notification is fired once and then nothing. I thought the notification would stay there until the cancellation and fired daily. Do I have to resend the notification again every time it is fired?
I added in the MauiProgram.cs the following lines
For the other settings, I followed the documentation. In the AndroidManifest.xml I added the following lines
The issue I had was with the Google Play. When I submitted the app with those settings, Google rejected my app because it is not an agenda or a calendar.