Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How To: Add Presence Information

To set presence information for a player, use the SignedInGamer.Presence property, which is a reference to a GamerPresence object. GamerPresence has two properties that are used to set presence information:

  • PresenceMode, which is set to one of the values of GamerPresenceMode.

    GamerPresenceMode contains values that represent strings describing what the player is doing in your game. For a full description of each, see the GamerPresenceMode reference topic.

  • PresenceValue, which is an integer that provides a numeric value used with some of the presence modes such as Stage, Level, and Score.

To set presence information for a player

Set SignedInGamer.Presence.PresenceMode with one of the values of GamerPresenceMode, as shown:

foreach (SignedInGamer signedInGamer in 
    SignedInGamer.SignedInGamers)
{
    signedInGamer.Presence.PresenceMode = 
        GamerPresenceMode.InCombat;
}
Dd231874.note(en-us,XNAGameStudio.31).gifNote
Some values will also require SignedInGamer.Presence.PresenceValue to be set, as described previously.
Dd231874.note(en-us,XNAGameStudio.31).gifNote

A game title will not be displayed in a player's presence information on the Xbox LIVE service until that game passes peer review. Once a game passes peer review, the presence information for a player shows three things: a confirmation the player is playing an Xbox LIVE Indie Game, the game's title, and the presence information set by SignedInGamer.Presence. For example:

        Xbox LIVE Indie Game
        My Game Title
        Fighting the Boss
      

While a game is in development, but before the game passes peer review, the presence information indicates the developer is using the XNA Creators Club, as shown:

        XNA Creators Club
        creators.xna.com
        Fighting the Boss
    

Community Additions

ADD
Show:
© 2015 Microsoft