question

Kim Strasser avatar image
Kim Strasser asked

Is it possible to store the content of a push notification in title player account?

I want to use SendPushNotification server API in Cloud Script to notify the player, for example when the player won an item or virtual currency. Is it possible to store the subject and the message of this push notification somewhere in title player account?

I need to store the subject and the message somewhere so that the player can read it when he wants.

Is there something similar like PlayFabClientAPI.GetTitleNews for push notifications so that the player can read his notifications when he wants?

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

·
Seth Du avatar image
Seth Du answered

You may use Player Data to store it or directly store locally in the client. I don’t think it necessary to be stored somewhere safe like Player Read-only data because it only for reading.

If you want to store on the server side so that player can review it at any time or after switching to a new device, I think you can add a client API call UpdateUserData to upload the notification contents (in OnMessageReceived Functions if it is in Android). Meanwhile, as I have noticed in many mobile games on the market, they may directly cache the data locally to reduce the server loads.

4 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.

Kim Strasser avatar image Kim Strasser commented ·

I found out that the free limit for player data value size is 10,000 bytes. But how many free player data key/value pairs can I create?

I'm not sure if I should create one key/value pair for each push notification that I send to the player.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Kim Strasser commented ·

There is no specified limit to the amount number of data entries, the player data value size 10,000 bytes should be calculated via total key size plus total value size.

0 Likes 0 ·
Kim Strasser avatar image Kim Strasser Seth Du ♦ commented ·

Is it possible to display the current used total size(key size + value size) in Game Manager?

What happens if a player already uses 10,000 bytes and if my cloud script tries to create a new key/value pair for this player? Does cloud script create the key/value pair in this case or not?

0 Likes 0 ·
Show more comments

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]