1

I make a Xamarin.forms app and try to make a reminder. I follow this documentation.

I've created everything and tested and work perfectly fine. Now my scenario is every user can add one or more reminders. Reminder can be called from every hour to every day depending on how the user configure the reminder.

How to organize this? My main question is how to save that list of reminders in the device and depending on time the OS should call it?

RazrMan
  • 163
  • 13
  • You could make a database and save all the reminders. When you want to show the reminders, you could get the list from database. Check the local database. https://learn.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/data/databases – Wendy Zang - MSFT Jun 26 '20 at 07:35
  • @WendyZang-MSFT my idea is this. The user enter one or more reminders with DateTime. For example he set reminder in 4 hours. App can be open or closed but notification must remind him. Did i need to save this in the OS ? – RazrMan Jun 26 '20 at 07:56
  • @WendyZang-MSFT i need to schedule the notifications – RazrMan Jun 26 '20 at 09:54
  • You could use `PendingIntent.GetBroadcast` repeat. Please check the links below: https://stackoverflow.com/questions/47394282/schedule-local-notification-xamarin-forms https://forums.xamarin.com/discussion/71168/sending-local-notifications-after-some-time-in-xamarin-android – Wendy Zang - MSFT Jun 30 '20 at 09:20
  • @WendyZang-MSFT thank u i will see – RazrMan Jul 01 '20 at 06:20
  • @WendyZang-MSFT this is only for android . Do u have for ios? – RazrMan Jul 01 '20 at 06:26
  • For iOS, you can add the properties repeatInterval or repeatCalendar. Check the link: https://developer.apple.com/documentation/uikit/uilocalnotification – Wendy Zang - MSFT Jul 01 '20 at 06:30
  • @WendyZang-MSFT and for Android i need BroadcastReceiver ? – RazrMan Jul 01 '20 at 06:35
  • There are many ways. You could check the sample code in the link i provided. – Wendy Zang - MSFT Jul 01 '20 at 06:39

0 Answers0