Game​Service Game​Service Game​Service Class

Definition

Provides access to the game service.

public static class GameServicepublic static class GameServicePublic Static Class GameService
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

Gets the Uri of the game service.

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

The Uri of the game service.

Attributes

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()

Gets the last authentication result from the game service.

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

The last authentication result from the game service.

Attributes

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()

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 )
Returns

When this method completes, it returns a GameServicePropertyCollection representing the gamer profile.

Attributes

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()

Retrieves the currently installed game items.

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

When this method completes, it returns a GameServicePropertyCollection representing the list of installed items.

Attributes

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)

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 )
Parameters
audienceUri
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.

Attributes

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()

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 )
Returns

When this method completes, it returns the privilege string.

Attributes

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)

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 void
Parameters
achievementId
System.UInt32 System.UInt32 System.UInt32

The identifier of the achievement.

Attributes

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)

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 void
Parameters
avatarAwardId
System.UInt32 System.UInt32 System.UInt32

The identifier of the avatar award.

Attributes

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)

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
Parameters
audienceUri
Uri Uri Uri

The specified Uri.

Attributes

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)

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 void
Parameters
gameVariant
System.UInt32 System.UInt32 System.UInt32

An app-specific game variant identifier.

scoreKind
GameServiceScoreKind GameServiceScoreKind GameServiceScoreKind

The kind of score in the result.

scoreValue
System.Int64 System.Int64 System.Int64

The score value in the result.

buffer
IBuffer IBuffer IBuffer

A data buffer to be included with the result.

Attributes

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.