question

brendan avatar image
brendan asked

Questions on Push Notifications

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?

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

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.

5 comments
10 |1200

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

developerjazzhaq avatar image developerjazzhaq commented ·

Thanks Brenden...

0 Likes 0 ·
developerjazzhaq avatar image developerjazzhaq commented ·

Thanks a lot brenden

0 Likes 0 ·
ignat-nee-1 avatar image ignat-nee-1 commented ·

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

0 Likes 0 ·
ignat-nee-1 avatar image ignat-nee-1 ignat-nee-1 commented ·

My apologies. Already find out answer - there is "segment" block in players section from dashboard, when you able create notification script for all players.

0 Likes 0 ·
brendan avatar image brendan ♦♦ ignat-nee-1 commented ·

Correct - and for others looking into this, it's specifically called the "Task" system in the Game Manager (currently under the Automation tab).

0 Likes 0 ·

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]