question

brendan avatar image
brendan asked

How can I use Push Notifications

Question from a developer:

How can I use Push Notifications in PlayFab?

 

Push Notifications
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

There are a couple of ways to do Push Notifications right now. One is via our Server API set (https://api.playfab.com/Documentation/Server/method/SendPushNotification), which is commonly used for sending player-driven events like telling a player that his score has been beaten by a friend, or that their base has been attacked. What you would is, when a player takes an action that could trigger a Cloud Script (to tell the other player something, usually) check in Cloud Script if there are any players that need to be notified, and send them the appropriate message.

The other is via PlayStream (https://playfab.com/features/#play-stream). Using PlayStream lets you trigger Actions based upon Events occurring in the service, which let you automatically do things like granting items or VC to players, setting statistics, calling a Cloud Script, or (as in this example) sending a Push Notification.

We'll also be providing ways to do bulk notifications to users in an upcoming update, including via our Add-ons Marketplace, with OneSignal.

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.