none
[UWP][XBOX]Are Add-ons supported on XBox one through universal apps?

    Question

  • Hi,

    We've released a Windows 10 app with in-app purchases/add-ons. That all works fine but when running it on an XBox one they don't work. I was just wondering if anyone knew whether these were actually supported on the XBox one? We can't seem to get any information from our Microsoft contact regarding this.

    If I attempt to run the app on an xbox using the live windows store I get this error:

    Error getting product listing: System.Exception: Exception from HRESULT: 0x803F6107 at Windows.ApplicationModel.Store.CurrentApp.LoadListingInformationAsync()

    If I use the debug store (CurrentAppSimulator) and supply it with a fake xml file containing add-ons it does retrieve the item list but when I attempt to purchase an item it fails with another 'unsupported' error.

    Thanks!


    Thursday, November 3, 2016 11:14 AM

Answers

  • To close the loop here.

    I worked with Tony offline and it turned out when he moved to using the new Store APIs, he was using the old pattern of using the InAppOfferToken string when attempting a purchase with RequestPurchaseAsync() and the product wasn't found.  Instead with the new APIs you use the Store Product ID to purchase a product and you can get the Product Id from the Dev Center.

    Or better yet, when you call GetAssociatedProductsAsync() it returns a list of StoreProducts (one for each AddOn) so if you hold on to this object,  you can call RequestPurchaseAsync directly to purchase the AddOn.

    To debug on PC, he was also able to uninstall the app, install from store again and then side load from Visual Studio and debug Store APIs on his PC.  However on Xbox Store APIs will currently only work when the app is downloaded directly from the store, side loading on top of that will lose the license and thus Store APIs will fail.  We're looking at how to improve this experience in the future.

    Sam


    Sam Jarawan - Senior Development Lead - Server and Tools Online

    Friday, November 11, 2016 11:26 PM

All replies

  • Yes absolutely, IAP Add-Ons are supported on Xbox Universal apps. However you'll need to leverage the newer Store APIs under the new Windows.Services.Store namespace instead of the Windows.ApplicationModel.Store APIs.

    Here are some links to a getting started guide, APIs and sample code:

    Getting Started

    Windows.Services.Store APIs

    Store Sample Code

    Hope this is helpful,

    Sam


    Sam Jarawan - Program Manager - Universal Store - Store Experiences OS/SDK Team


    Thursday, November 3, 2016 6:05 PM
  • Has your app been published for XBOX? About 0x803F6107 document says,

    Note  If you do not associate your project with an app in the Store, the StoreContext methods set the ExtendedError property of their return values to the error code value 0x803F6107. This value indicates that the Store doesn't have any knowledge about the app.

    I had same problem when debugging. But after publishing (found in the xbox store), Windows.ApplicationModel.Store also works.

    But I don't know if Windows.ApplicationModel.Store will still work in the future, I asked about it in an old post, MSFT tell me it is still supported, but I don't know if they have changed their idea again. The new API does not support all functions of the OLD ones. I may wait the new API to be stable and then changed to the new one.

    • Edited by Exilerrr Friday, November 4, 2016 3:19 AM
    Friday, November 4, 2016 3:11 AM
  • Hi Sam,

    Thank you for the information, I didn't realise I'd have to use the new API for that as the old one seemed to work ok on Windows 10. I'll switch over and try that out.

    Friday, November 4, 2016 11:12 AM
  • Hi,

    The app is published for Windows 10 but not XBox yet - it didn't even work with the fake in-app-purchase.xml system though so I'm hoping the problem lies with me using the old API like Sam mentioned.

    Thanks!

    Friday, November 4, 2016 11:13 AM
  • The new APIs are definitely the way to go and in fact have better performance and flexible support for new and future AddOn types. The one thing you lose is the new APIs don't have an equivalent testing framework like the CurrentAppSimulator. 

    Instead, the suggested way to test is against real published AddOns in the store.  During development phase you can publish a hidden app, it could just be a minimal stub version of the app, then install the app from the store which will pull down a valid license for the app.  You can then side load your app from Visual Studio and all Store APIs will succeed against the real AddOns in the store since the license will be there.  The Getting Started link I sent above has details.

    There is one exception however, when you side load on the Xbox the license will not be maintained so you should do all your testing on desktop then when ready to test on Xbox push an update to the store and download on xbox from the store.

    Sam


    Sam Jarawan - Program Manager - Universal Store - Store Experiences OS/SDK Team

    Friday, November 4, 2016 3:45 PM
  • I'm using new APIs now, but still has problem on Xbox One:

    One Add-On is active on PC, but not active on XBOX. (same user, same app version)

    While another Add-On is OK (both active)

    And it is impossible to debug the store API on xbox, since dev mode has no store data.

    Another suggestion, seems the new store API sample on github doesn't show how to check duration type Add-On, only how to purchase.


    • Edited by Exilerrr Saturday, November 5, 2016 8:34 AM
    Saturday, November 5, 2016 8:25 AM
  • When you say one is active on PC and not xbox and the other is active on both, are you saying you can see on Xbox that one of your AddOns that you've purchased is Active on Xbox or can you elaborate and perhaps share the code you're using.  You also mentioned the app was not enabled in Dev Center for Xbox yet, is that correct?

    Also what do you mean by duration type?

    thanks,

    Sam


    Sam Jarawan - Senior Development Lead - Server and Tools Online

    Monday, November 7, 2016 6:11 PM
  • Hi,

    I've also changed over to use the new API but I'm still having problems getting a list of available add-ons. Our app is definitely published and available in the Windows Store (for PC and XBox) - the app is also associated with the store in Visual Studio. When I run the app and attempt to call 'GetAssociatedStoreProductsAsync' I get zero results back and the error:

    System.Exception: Excep_FromHResult 0x803F6107

    This happens on both PC and XBox. From that error I understand it's related to the app not being published but that's definitely not the case here. When I retrieve the app license it says it's valid but 'IsTrial' is set to True and 'IsActive' is set to False so I'm not sure if that's causing any problems? The User value returned from the current StoreContext is also null (on PC and XBox).

    Any ideas?

    Wednesday, November 9, 2016 3:19 PM
  • Tony,

    I just want to confirm that you've downloaded the app from the store and that version still sees the error when you run it?

    Can you send me an email with the store Id for the app you published to samjar@microsoft.com, you can get it from the URL in Dev Center when you are on the app page which looks something like this: https://developer.microsoft.com/en-us/dashboard/apps/9WZDNCRCWKFX

    thanks,

    Sam


    Sam Jarawan - Senior Development Lead - Server and Tools Online

    Wednesday, November 9, 2016 5:26 PM
  • To close the loop here.

    I worked with Tony offline and it turned out when he moved to using the new Store APIs, he was using the old pattern of using the InAppOfferToken string when attempting a purchase with RequestPurchaseAsync() and the product wasn't found.  Instead with the new APIs you use the Store Product ID to purchase a product and you can get the Product Id from the Dev Center.

    Or better yet, when you call GetAssociatedProductsAsync() it returns a list of StoreProducts (one for each AddOn) so if you hold on to this object,  you can call RequestPurchaseAsync directly to purchase the AddOn.

    To debug on PC, he was also able to uninstall the app, install from store again and then side load from Visual Studio and debug Store APIs on his PC.  However on Xbox Store APIs will currently only work when the app is downloaded directly from the store, side loading on top of that will lose the license and thus Store APIs will fail.  We're looking at how to improve this experience in the future.

    Sam


    Sam Jarawan - Senior Development Lead - Server and Tools Online

    Friday, November 11, 2016 11:26 PM
  • Hi, I'm curious if this is still the case or has been remedied? If it is still the case, should it be?

    Best,

    Hayden

    Tuesday, October 9, 2018 7:27 PM