Presence Backend Reference #

This section provides Presence service references for plugins, classes, exts, and configuration values defined in the Pragma Engine backend. For specifics on the using the Pragma SDK for Presence tasks, see Presence SDK Reference.

The Presence Plugin #

The Presence Plugin provides a location for developers to implement custom presence functionality, such as handling the rich presence ext. The Presence Tasks topic shows example usage of the Presence Plugin methods, along with the SDKs that invoke them.

Presence class #

propertydescription
socialIdUnique social identifier for the player (game agnostic)
playerIdUnique player ID
gameShardIdUnique identifier of the game shard associated with this presence object
gameTitleIdTitle of the game associated with the gameShardId. See Game Title Management in the Portal documentation for more information of game shard/game title mapping.
basicPresenceBasicPresence object representing whether the user appears “online” or “away”. See following table.
extCustom ExtRichPresence payload containing custom data to display to friends

Basic presence enum #

propertydescription
onlineUser’s presence status is “online”
awayUser’s presence status is “away”

Extension data #

You can use Extension Data (exts) to define custom data about player presence statuses. See Presence Tasks for sample implementation.

The following table lists the ext payloads relevant to presence information.

extdescriptionexample data
ExtRichPresencePlayerRequestCustom presence values set/updated by the player clientcustom away message
ExtRichPresenceBackendRequestCustom presence values set/updated by the game servercurrent score

Configuration #

The FriendsServiceConfig configuration block provides a place to define default values for the Friend and Presence services.

The following configuration values are related to Presence features:

configdescription
enablePresenceUpdatesEnable or disable ability to update presence statuses. If false, a player’s basic and rich presences cannot be updated. The Presence API’s GetPresence method is still available and will return presence values (if any) at the time enablePresenceUpdates was set to false.

Default: true

See Friend Reference for information on other configuration values.

Errors #

  • Presence_GameIdentityNotFound
  • Presence_PresenceNotFound