Вопрос про мобильные системы. Разброд и шатания.
Вот на этой странице схожие примеры, но один оканчивается DisposeOf, а другой Free.
http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Mobile_Tutorial:_Using_Notifications_(iOS_and_Android)
procedure TForm1.RepeatedNotificationClick(Sender: TObject);
var
MyNotification: TNotification;
begin
MyNotification := NotificationCenter1.CreateNotification;
try
MyNotification.Title := 'MyNotification';
MyNotification.AlertBody := 'Repeating notification each minute!';
//Fired in 10 seconds
MyNotification.FireDate := Now + EncodeTime(0, 0, 10, 0);
//Repeated each minute
MyNotification.RepeatInterval := TRepeatInterval.Minute;
// Send notification to the notification center
NotificationCenter1.ScheduleNotification(MyNotification);
finally
MyNotification.Free;
end;
end;
procedure TForm1.ScheduleNotificationClick(Sender: TObject);
var
MyNotification: TNotification;
begin
MyNotification := NotificationCenter1.CreateNotification;
try
MyNotification.Name := 'MyNotification';
MyNotification.AlertBody := 'Delphi for your mobile device is here!';
// Fired in 10 seconds
MyNotification.FireDate := Now + EncodeTime(0, 0, 10, 0);
// Send notification to the notification center
NotificationCenter1.ScheduleNotification(MyNotification);
finally
MyNotification.DisposeOf;
end;
end;