XboxLiveDevelopment


can not get user's Achievements by using XBOX Live SDK's sample codes


I modified the sample codes in xbox live sdk. the XboxLive user signed in success,but the code can not get the user's Achievements by invoking the AchievementService.
Environment
SwitchSandbox.cmd XDKS.1
"TitleId" : 929134689,
"PrimaryServiceConfigId" : "15350100-1645-4a71-a180-2d5637617861"
Xbox live Sdk version
XboxLiveSDK-1611-161031-001
Sample Code
XboxLiveSDK-1611-161031-001\SourceAndSamples\Samples\Social\UWP\CSharp
Source Code
private async void showAchievements(XboxLiveUser user)
{
Microsoft.Xbox.Services.XboxLiveContext m_xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(user);
try
{
AchievementsResult results = await m_xboxLiveContext.AchievementService.GetAchievementsForTitleIdAsync(m_xboxLiveContext.User.XboxUserId,m_xboxLiveContext.AppConfig.TitleId,AchievementType.Challenge, false, AchievementOrderBy.Default,0, 100);
/*Achievement achievement = await m_xboxLiveContext.AchievementService.GetAchievementAsync(m_xboxLiveContext.User.XboxUserId,
m_xboxLiveContext.AppConfig.ServiceConfigurationId, "1");*/
//HasNext is false,results.size==0
results.Items.ToList().ForEach(achievement =>
{
try
{
this.LogEvent(String.Format("Achievement: {0} (ID: {1},G: {2})", achievement.Name, achievement.Id,achievement.Rewards));
}
catch (Exception e)
{
Log("print Achievement failed. Exception: " + e.ToString());
}
});
} catch(Exception e)
{
this.LogEvent(String.Format("Exception: {0}", e.ToString()));
}
}
XboxLiveAccountTool.exe result is ok
XboxLiveSDK-1611-161031-001\Tools\XboxLiveAccountTool.exe
Sandbox:XDKS.1
Gamescore:170
The GetAchievementsForTitleIdAsync API only retrieves achievements for the user of that specific TitleId. It doesn't not return achievements that the user has achieved for other titles.
Also note that the social sample isn't configured with any achievements. You can either run the Achievement sample itself or change the configuration (xboxservices.config & Package.appxmanifest) of your existing sample to match that of the Achievement
sample.
The GetAchievementsForTitleIdAsync API only retrieves achievements for the user of that specific TitleId. It doesn't not return achievements that the user has achieved for other titles.
Also note that the social sample isn't configured with any achievements. You can either run the Achievement sample itself or change the configuration (xboxservices.config & Package.appxmanifest) of your existing sample to match that of the Achievement
sample.
hi,AdityaToney, Can i use xbox live api to fetch achievements for other game title ? Which Api can work?
thanks.
Yes, however this will require additional service side configuration and is not enabled by default. What is the scenario that you would like to enable?

Related Links

StatsManager AddLocalUser
Get Microsoft Xbox friends list
Xbox live Api REST
UWP Unity Sample, Missing Assembly
Cannot Update Xbox Live Creators Program Leaderboard
Xbox live c# development (no unity)
StatisticUpdateComplete Documentation or Example
young children developing games
[XboxLiveDevelopment] [UWP] [LIVE]
LeaderBoard Display
Launch date?
[UWP][HTML][XBOX] Leaderboards and eliminating stuttering in Xbox UWP games? (Construct 2)
Where can I find Xbox Api's that don't require a lot of hacks? Why cannot the xbox api's be released publicly?
Has the Xbox Live Creators Program gone live?
[UWP][HTML][XBOX] Eliminate stuttering in Xbox UWP games? (Construct 2)
Can't sign in to my app's Sandbox on Xbox One in dev mode

Categories

MSDN
Windows Phone Development
Windows Phone Dev Center
Visual FoxPro
Windows Embedded Compact
Lync Server
Microsoft Azure
Archived Forums N-R
Windows Phone Preview ...
Virtualization
C++ Standards, Extensi...
Visual Studio Diagnost...
Visual Studio Tools fo...
Publishing Windows Sto...
Promote Your App
Application Compatibil...
Developing Windows Des...
Application Security f...
Windows Desktop Winsoc...
SharePoint 2013 - Deve...
SharePoint 2013 - Setu...
SharePoint Legacy Vers...
SharePoint Legacy Vers...
Pricing & Billing
Azure Pack
Azure Search
Azure API Management
Azure Notification Hubs
Azure CDN
Azure Batch
Azure Service Fabric
Language Understanding...
Azure Security Center
Azure Stack
.NET Framework Class L...
Team Foundation Server...
Team Foundation Server...
Team Foundation Server...
Team Foundation Server...
Software Modeling Tools
BizTalk ESB Toolkit
ADO.NET Managed Providers
XML, System.Xml, MSXML...
Debugger Canvas
HealthVault Developer
Microsoft Live Labs Volta
JScript Native
ISV Open Discussions
Training and Certifica...
Small Basic
SyncFx – Microsoft Syn...
Windows Mobile Develop...
Visual Studio Smart De...
SQL Server Integration...
SQL Server Compact
SQL Server Data Tools
Standard 2009: Tools
Standard 2009: Misc
Standard 7: Embedded E...
Windows Embedded Compa...
SQL Server 2012 Spatia...
SQL Server 2012 Analys...
Windows Forms General
Windows Live Messenger...
Windows Live  Spaces: ...
CRM Deployment
Bing Maps WPF, WP7/8/8...
Office Live Basics, Es...
SQL Server Protocols
Project Server - Setup...
Microsoft Atlas APIs: ...
Accessing Web Services...
Game Development with ...
.NET Platform Architec...
CAT.NET
Core Coding Experience...
Developer Documentatio...
Direct3D 10
Doloto
Feedback for Visual Ba...
Game Technologies: Aud...
General Troubleshootin...
Innovate on Office
ISV Community Days
Moderator Posting Only...
Office Live Small Busi...
Search Server: Develop...
Search Server: Feature...
Small Business Applica...
Security for Azure
SQL Server 2014 Report...
SQL Server 2014 Integr...
Team Foundation Server...
Transactions Programming
Visual Basic IDE
Visual C++ Express 200...
Visual Studio 2008 IDE...
Web Sandbox - Exploits
Windows Events
XML in Windows (MSXML ...
Windows Phone Preview ...
Cortana Skills Kit

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile