thudugala / Plugin.LocalNotification

The local notification plugin provides a way to show local notifications from .Net MAUI and Xamarin Forms apps .
MIT License
401 stars 66 forks source link

Repeat Notification doesn't work #454

Closed ShariatPanah closed 8 months ago

ShariatPanah commented 8 months ago

Describe the bug so i want to set the notification to repeat for example every 5 minutes, so i use this code:

_request = new NotificationRequest
{
.
.
.
  Schedule =
  {
      RepeatType = NotificationRepeat.TimeInterval,
      NotifyRepeatInterval = TimeSpan.FromMinutes(5)
  }
};

but it just shows the notification only once and it won't repeat, i tried even with your sample but with no luck, maybe I'm missing something?

To Reproduce Steps to reproduce the behavior: just run your sample and edit your code to have a TimeInterval Repeat mode notification

Platform

Smartphone:

thudugala commented 8 months ago

@ShariatPanah https://github.com/thudugala/Plugin.LocalNotification/wiki/4.-Repeat-Notification

Can you please attach a sample project?

https://github.com/thudugala/Plugin.LocalNotification/wiki/3.-Scheduled-Android-notifications

ShariatPanah commented 8 months ago

i've attached the sample project i just created i tested this on pixel 5 emulator with api 31 android 12.0

LocalNotificationBug.zip

ShariatPanah commented 8 months ago

Hey @thudugala did you test it?

thudugala commented 8 months ago

@ShariatPanah To repeat a notification, the notification must be Scheduled. You can Schedule notifications by setting NotifyTime in NotificationRequest.

https://github.com/thudugala/Plugin.LocalNotification/wiki/4.-Repeat-Notification

thudugala commented 8 months ago

@ShariatPanah Please read this doc. I do not think you have configured this project correctly https://github.com/thudugala/Plugin.LocalNotification/wiki/1.-Usage-10.0.0--.Net-MAUI

ShariatPanah commented 8 months ago

sorry my bad :) thanks