Push notification Android GCM - how to clear a Message?

时间:2015-07-31 20:36:49

标签: android delphi google-cloud-messaging

Delphi XE8, I send a Message by json to the GCM. After click the Message I read it by...:

var
  LNotification: TPushServiceNotification;
begin
  for LNotification in AServiceConnection.Service.StartupNotifications do
  begin
    if Assigned(LNotification) and (LNotification.Json.ToString<>'') then
    begin
      Memo1.Lines.Add('Enter by Notification Click: ' +     LNotification.Json.ToString);
    end;
  end;
end;

Could you help me to clear the Message from Push panel?

1 个答案:

答案 0 :(得分:1)

据我所知,您无法删除一个特定推送通知,但要删除所有推送通知,请添加TNotificationCenter组件并使用CancelAll方法。

P.S:如果应用程序在收到推送时正在运行,则单击它将删除。