Share via


Implement Rich Presence in your game

This article describes how to use Rich Presence. It shows what a player is doing and where they are in the game.

Implement Rich Presence by using the Microsoft Game Development Kit

  1. Define enumerations:
    Create an enumeration that defines the structure of your game's Rich Presence data. This enumeration specifies the fields and data types for the information that you want to display. For example, map name, game mode, or player count. The enumerations are defined through the events from Xbox services player data.
  2. Configure Rich Presence in Microsoft Partner Center:
    Set up and configure Rich Presence strings in Partner Center. This involves defining locale-string pairs and string-sets to ensure that presence information is accurately localized for various countries/regions. For more information, see Configuring Rich Presence strings in Partner Center.
  3. Set the activity state:
    When a player's activity changes, update their activity state by using XblPresenceSetPresenceAsync. For example, the player enters a new level or they join a match. This involves populating the fields that are defined in your activity schema with the current player's data. This is done by calling the MPA APIs so you can set the current activity and its related data. For more information, see Updating a user's presence via XSAPI C.
  4. Get the activity state of other players:
    Get the activity state of other players that another player is interested in by using XblPresenceGetPresenceAsync or XblPresenceGetPresenceForMultipleUsersAsync. For more information, see Getting a user's presence.

See also

The Microsoft Game Development Kit (GDK) documentation is the best source of up-to-date information. For more details see the following articles.