Rustam
Rustam

Reputation: 61

Push notification Android GCM - how to clear a Message?

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?

Upvotes: 1

Views: 922

Answers (1)

Agustin Seifert
Agustin Seifert

Reputation: 1968

As far as I know you cannot remove one specific push notification, but to remove all, add TNotificationCenter component and use CancelAll method.

P.S: if application is running when push is received, clicking it will remove.

Upvotes: 1

Related Questions