Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

How do I get Title of remote push notification in TPushEvents.OnPushReceived?

$
0
0

Using Delphi Seattle 10 for iOS and Android development:

I want to forward remote pushes I receive using TPushEvents and TParseProvider to the NotificationCenter component, but how do I get the title of the push (see ????? in code below)?

Or does someone know another approach for always forwarding a remote push (from  parse.com) to the device's notification center (so not only if the app is inactive)?

 

procedure TForm1.PushEvents1PushReceived(Sender: TObject; const AData: TPushData);

var

  MyNotification: TNotification;

begin

  MyNotification := NotificationCenter1.CreateNotification;

  try

      MyNotification.Name := ?????;

      MyNotification.AlertBody := AData.Message;

      NotificationCenter1.PresentNotification(MyNotification);

  finally

    MyNotification.DisposeOf;

  end;

end;


Viewing all articles
Browse latest Browse all 3212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>