Questions on Push Notifications from a developer:
1. Can I send Push Notifications to a specific device?
2. I want to give players a daily reward, similar to regenerating currencies (but a catalog item, in this case). How would I drive notifications about this gift? Can I have the Push send every day at a certain time?
3. Is there an example anywhere of a friend asking another user via Photon for help or issuing a challenge, which uses Push Notifications?
Answer by Brendan · May 04, 2017 at 04:46 AM
1. Push Notifications are sent to a player account, rather than a device. So all devices configured for Push Notifications for that player, in that title, would receive the notification message.
2. Yes, you could create a scheduled Task which operates on the "all players" segment, and have it send out a once-a-day notification to players, to let them know about their gift. In it, trigger a script that checks the player's last sign-in timestamp, so that you don't send the notification to players who have already received the day's gift.
3. Photon Realtime doesn't directly provide a way to have hosted game logic, so the logic for requesting that a Push Notification be sent would have to come from the client. What you could do is have the client call a Cloud Script which checks to make sure that the request is legitimate (so that players aren't spamming people), and sends the Push.
Greetings.
There is a small question - how can i send push notification to all players?
My apologies for such question, but i'm find script for only one recepient:
https://api.playfab.com/documentation/Server/method/SendPushNotification
My apologies. Already find out answer - there is "segment" block in players section from dashboard, when you able create notification script for all players.
Correct - and for others looking into this, it's specifically called the "Task" system in the Game Manager (currently under the Automation tab).