xamarin forms alarm
public string Create(string title, string message, DateTime scheduleDate, Dictionary<string, string> extraInfo)
{
// Create the unique identifier for this notifications.
var notificationId = Guid.NewGuid().ToString();
// Create the alarm intent to be called when the alarm triggers. Make sure
// to add the id so we can find it later if the user wants to update or
// cancel.
var alarmIntent = new Intent(Application.Context, typeof(NotificationAlarmHandler));
alarmIntent.SetAction(BuildActionName(notificationId));
alarmIntent.PutExtra(TitleExtrasKey, title);
alarmIntent.PutExtra(MessageExtrasKey, message);
// Add the alarm intent to the pending intent.
var pendingIntent = PendingIntent.GetBroadcast(Application.Context, 0, alarmIntent, PendingIntentFlags.UpdateCurrent);
// Figure out the alaram in milliseconds.
var utcTime = TimeZoneInfo.ConvertTimeToUtc(scheduleDate);
var epochDif = (new DateTime(1970, 1, 1) - DateTime.MinValue).TotalSeconds;
var notifyTimeInInMilliseconds = utcTime.AddSeconds(-epochDif).Ticks / 10000;
// Set the notification.
var alarmManager = Application.Context.GetSystemService(Context.AlarmService) as AlarmManager;
alarmManager?.Set(AlarmType.RtcWakeup, notifyTimeInInMilliseconds, pendingIntent);
// All done.
return notificationId;
}