GameService GameService GameService GameService Class

Provides access to the game service.

Syntax

Declaration

public static class GameServicepublic static class GameServicePublic Static Class GameServicepublic static class GameService

Remarks

All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

Properties summary

Gets the Uri of the game service.

Methods summary

Gets the last authentication result from the game service.

Retrieves the gamer profile for the current user.

Retrieves the currently installed game items.

Retrieves the partner token for the specified Uri.

Retrieves the privilege string for the current user.

Grants the specified achievement to the current user.

Grants the specified avatar award to the current user.

Invalidate the cached partner token for the specified Uri.

Terminate and post the results of a game.

Properties

  • ServiceUri
    ServiceUri
    ServiceUri
    ServiceUri

    Gets the Uri of the game service.

    public static Uri ServiceUri { get; }public static Uri ServiceUri { get; }Public Static ReadOnly Property ServiceUri As Uripublic static Uri ServiceUri { get; }

    Property Value

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

Methods

  • GetAuthenticationStatus()
    GetAuthenticationStatus()
    GetAuthenticationStatus()
    GetAuthenticationStatus()

    Gets the last authentication result from the game service.

    public static uint GetAuthenticationStatus()public static uint GetAuthenticationStatus()Public Static Function GetAuthenticationStatus() As uintpublic static uint GetAuthenticationStatus()

    Returns

    • uint
      uint
      uint
      uint

      The last authentication result from the game service.

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

  • GetGamerProfileAsync()
    GetGamerProfileAsync()
    GetGamerProfileAsync()
    GetGamerProfileAsync()

    Retrieves the gamer profile for the current user.

    public static IAsyncOperation<GameServicePropertyCollection> GetGamerProfileAsync()public static IAsyncOperation<GameServicePropertyCollection> GetGamerProfileAsync()Public Static Function GetGamerProfileAsync() As IAsyncOperation( Of GameServicePropertyCollection )public static IAsyncOperation<GameServicePropertyCollection> GetGamerProfileAsync()

    Returns

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

  • GetInstalledGameItemsAsync()
    GetInstalledGameItemsAsync()
    GetInstalledGameItemsAsync()
    GetInstalledGameItemsAsync()

    Retrieves the currently installed game items.

    public static IAsyncOperation<GameServicePropertyCollection> GetInstalledGameItemsAsync()public static IAsyncOperation<GameServicePropertyCollection> GetInstalledGameItemsAsync()Public Static Function GetInstalledGameItemsAsync() As IAsyncOperation( Of GameServicePropertyCollection )public static IAsyncOperation<GameServicePropertyCollection> GetInstalledGameItemsAsync()

    Returns

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

  • GetPartnerTokenAsync(Uri)
    GetPartnerTokenAsync(Uri)
    GetPartnerTokenAsync(Uri)
    GetPartnerTokenAsync(Uri)

    Retrieves the partner token for the specified Uri.

    public static IAsyncOperation<string> GetPartnerTokenAsync(Uri audienceUri)public static IAsyncOperation<string> GetPartnerTokenAsync(Uri audienceUri)Public Static Function GetPartnerTokenAsync(audienceUri As Uri) As IAsyncOperation( Of string )public static IAsyncOperation<string> GetPartnerTokenAsync(Uri audienceUri)

    Parameters

    • audienceUri

      The Uri for which the partner token is retrieved.

    Returns

    • When this method completes, it returns a string containing the partern token.

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

  • GetPrivilegesAsync()
    GetPrivilegesAsync()
    GetPrivilegesAsync()
    GetPrivilegesAsync()

    Retrieves the privilege string for the current user.

    public static IAsyncOperation<string> GetPrivilegesAsync()public static IAsyncOperation<string> GetPrivilegesAsync()Public Static Function GetPrivilegesAsync() As IAsyncOperation( Of string )public static IAsyncOperation<string> GetPrivilegesAsync()

    Returns

    • When this method completes, it returns the privilege string.

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

  • GrantAchievement(UInt32)
    GrantAchievement(UInt32)
    GrantAchievement(UInt32)
    GrantAchievement(UInt32)

    Grants the specified achievement to the current user.

    public static void GrantAchievement(UInt32 achievementId)public static void GrantAchievement(UInt32 achievementId)Public Static Function GrantAchievement(achievementId As UInt32) As voidpublic static void GrantAchievement(UInt32 achievementId)

    Parameters

    • achievementId
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The identifier of the achievement.

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

  • GrantAvatarAward(UInt32)
    GrantAvatarAward(UInt32)
    GrantAvatarAward(UInt32)
    GrantAvatarAward(UInt32)

    Grants the specified avatar award to the current user.

    public static void GrantAvatarAward(UInt32 avatarAwardId)public static void GrantAvatarAward(UInt32 avatarAwardId)Public Static Function GrantAvatarAward(avatarAwardId As UInt32) As voidpublic static void GrantAvatarAward(UInt32 avatarAwardId)

    Parameters

    • avatarAwardId
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The identifier of the avatar award.

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

  • NotifyPartnerTokenExpired(Uri)
    NotifyPartnerTokenExpired(Uri)
    NotifyPartnerTokenExpired(Uri)
    NotifyPartnerTokenExpired(Uri)

    Invalidate the cached partner token for the specified Uri.

    public static void NotifyPartnerTokenExpired(Uri audienceUri)public static void NotifyPartnerTokenExpired(Uri audienceUri)Public Static Function NotifyPartnerTokenExpired(audienceUri As Uri) As voidpublic static void NotifyPartnerTokenExpired(Uri audienceUri)

    Parameters

    Remarks

    If the partner token returned by GetPartnerTokenAsync(Uri) has expired this notifies the game service API to remove any cached data so that the next call will return a new partner token.

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

  • PostResult(UInt32, GameServiceScoreKind, Int64, GameServiceGameOutcome, IBuffer)
    PostResult(UInt32, GameServiceScoreKind, Int64, GameServiceGameOutcome, IBuffer)
    PostResult(UInt32, GameServiceScoreKind, Int64, GameServiceGameOutcome, IBuffer)
    PostResult(UInt32, GameServiceScoreKind, Int64, GameServiceGameOutcome, IBuffer)

    Terminate and post the results of a game.

    public static void PostResult(UInt32 gameVariant, GameServiceScoreKind scoreKind, Int64 scoreValue, GameServiceGameOutcome gameOutcome, IBuffer buffer)public static void PostResult(UInt32 gameVariant, GameServiceScoreKind scoreKind, Int64 scoreValue, GameServiceGameOutcome gameOutcome, IBuffer buffer)Public Static Function PostResult(gameVariant As UInt32, scoreKind As GameServiceScoreKind, scoreValue As Int64, gameOutcome As GameServiceGameOutcome, buffer As IBuffer) As voidpublic static void PostResult(UInt32 gameVariant, GameServiceScoreKind scoreKind, Int64 scoreValue, GameServiceGameOutcome gameOutcome, IBuffer buffer)

    Parameters

    Remarks

    All members of the Windows.Phone.System.UserProfile.GameServices.Core namespace can only be used by the XBox Live SDK. These APIs cannot be called except by applications that have the ID_CAP_GAMERSERVICES capability.

Device family

Windows Mobile Extension SDK (introduced v10.0.10240.0)

API contract

Windows.Phone.PhoneContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Phone.System.UserProfile.GameServices.Core.dll