question

suraj17787 avatar image
suraj17787 asked

How to send push notification from one client to other client .Example Player p1 invites other Player p2 for a game so p1 sends a notification to p2 when p2 app is not opened.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Push Notifications are available via the Server API, so your best bet would be to enable this via Cloud Script. So for example, if player 1 gets the leaderboard around his own score and uses that to randomly select another user with a slightly higher score to challenge, you could use the PlayFab ID of that user, from the leaderboard data, to send the Push Notification. Obviously, Push does require that the player opted in to receiving those notifications, and that the player didn't subsequently turn off Push for the app in the device (which we would not get a notification about), so I would recommend also having a more traditional matchmaking system.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.