App给自己推送消息

procedure TMainDataModule.SendNotification(const ATitle, AAlertBody, AData: string);
var
   mNotice: TNotification;
begin
  if NotificationCenter1.Supported then
  begin
    mNotice := NotificationCenter1.CreateNotification;
    try
      mNotice.Name := kbmMWGlobal.kbmMWGenerateGUID;
      mNotice.Title := ATitle;
      mNotice.AlertBody := AAlertBody;
      mNotice.HasAction:=True;
      mNotice.AlertAction:=AData;
      // 通知
      NotificationCenter1.PresentNotification(mNotice);
    finally
      mNotice.DisposeOf;
    end;
  end;
end;

 

App给自己推送消息

上一篇:合并HTTP请求 vs 并行HTTP请求,到底谁更快?


下一篇:彻底卸载oracle10g