Game​Service Game​Service Game​Service Game​Service Class

Definition

Provides access to the game service.

public : static class GameServicepublic static class GameServicePublic Static Class GameService// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)

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

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 Uri// You can use this property in JavaScript.
Value
Uri Uri Uri Uri

The Uri of 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.

Methods

GetAuthenticationStatus() GetAuthenticationStatus() GetAuthenticationStatus() GetAuthenticationStatus()

Gets the last authentication result from the game service.

public : static unsigned short GetAuthenticationStatus()public static uint GetAuthenticationStatus()Public Static Function GetAuthenticationStatus() As uint// You can use this method in JavaScript.
Returns
unsigned short 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 )// You can use this method in JavaScript.
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 )// You can use this method in JavaScript.
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<PlatForm::String> GetPartnerTokenAsync(Uri audienceUri)public static IAsyncOperation<string> GetPartnerTokenAsync(Uri audienceUri)Public Static Function GetPartnerTokenAsync(audienceUri As Uri) As IAsyncOperation( Of string )// You can use this method in JavaScript.
Parameters
audienceUri
Uri Uri Uri Uri

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<PlatForm::String> GetPrivilegesAsync()public static IAsyncOperation<string> GetPrivilegesAsync()Public Static Function GetPrivilegesAsync() As IAsyncOperation( Of string )// You can use this method in JavaScript.
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(unsigned int achievementId)public static void GrantAchievement(UInt32 achievementId)Public Static Function GrantAchievement(achievementId As UInt32) As void// You can use this method in JavaScript.
Parameters
achievementId
unsigned int UInt32 UInt32 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(unsigned int avatarAwardId)public static void GrantAvatarAward(UInt32 avatarAwardId)Public Static Function GrantAvatarAward(avatarAwardId As UInt32) As void// You can use this method in JavaScript.
Parameters
avatarAwardId
unsigned int UInt32 UInt32 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 void// You can use this method in JavaScript.
Parameters
audienceUri
Uri Uri Uri Uri

The specified Uri.

Remarks

If the partner token returned by GetPartnerTokenAsync 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(unsigned int gameVariant, GameServiceScoreKind scoreKind, long 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 void// You can use this method in JavaScript.
Parameters
gameVariant
unsigned int UInt32 UInt32 UInt32

An app-specific game variant identifier.

scoreValue
long Int64 Int64 Int64

The score value in the result.

buffer
IBuffer IBuffer IBuffer IBuffer

A data buffer to be included with the result.

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.