在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
//消息提醒(从手机屏幕顶部向下滑动,出现的提示消息) NotificationC: TNotificationCenter; procedure TNotificationsForm.btnSendNotificationImmediatelyClick( Sender: TObject); var Notification: TNotification; begin { verify if the service is actually supported } if NotificationC.Supported then begin Notification := NotificationC.CreateNotification; try Notification.Name := 'MyNotification'; Notification.AlertBody := 'Delphi for Mobile is here!'; Notification.FireDate := Now; //可修改发送消息时间 { Send notification in Notification Center } NotificationC.ScheduleNotification(Notification); { also this method is equivalent } // NotificationService.PresentNotification(Notification); finally Notification.DisposeOf; end; end end; if NotificationC.Supported then NotificationC.CancelNotification('MyNotification'); //取消消息 NotificationC.CancelAll; //取消所有消息
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论