0
有人找到了使用DEPHI XE 5和Android OS編程鬧鐘的正確方法嗎?使用DELPHI XE5和Android的鬧鐘
我發現這個代碼,但它不工作/編譯可言:
procedure TNotificationsForm.btnSendScheduledNotificationClick(Sender: TObject);
var
Notification: TNotification;
begin
{ verify if the service is actually supported }
if NotificationC.Supported then // compile error here
begin.Supported
Notification := NotificationC.CreateNotification; // compile error here
try
Notification.Name := 'MyNotification';
Notification.AlertBody := 'Delphi for Mobile is here!';
{ Fired in 10 second }
Notification.FireDate := Now + EncodeTime(0,0,10,0);
{ Send notification in Notification Center }
NotificationC.ScheduleNotification(Notification);
finally
Notification.DisposeOf;
end;
end
end;
第一個錯誤是,NotificationC.Supported這個屬性不存在
您的「編譯錯誤」沒有數字或關聯的文本? –
忘了丟掉組件,我的錯 – Franz