Quickly build a Daily Reminders Mac application using FireMonkey

Posted by on in Blogs

I use the default Reminders app on my iPhone all the time, and thought I would highlight how easy it is to build a daily reminders application using FireMonkey.

 

This sample application uses our built-in local notifications support (using the TNotificationCenter component). The level of support varies by target platform.

procedure TNotificationsForm.btnSendScheduledNotificationClick(Sender: TObject);
var
  Notification: TNotification;
begin
  Notification := NotificationC.CreateNotification;
  try
    Notification.AlertBody := Memo1.Text;
    Notification.FireDate := Date + TimeEdit1.Time;
    NotificationC.ScheduleNotification(Notification);
    ShowMessage('Your reminder has been created');
  finally
    Notification.DisposeOf;
  end;
end;

 

 

Daily Reminders sample app running on macOS Sierra. Style used: CharcoalExpressive from DelphiStyles.com

 

 

Here's what the notification looks like in Notification Center on the Mac. You can easily deploy the same application to other platforms including iOS and Android. 'FireDate' is not supported on Windows.

 

 

 



About
Gold User, Rank: 5, Points: 558
Senior Product Manager, RAD Studio

Comments

Check out more tips and tricks in this development video: