应用内购买In-app purchases

HoloLens 支持应用内购买,但有一些工作需要进行设置。In-app purchases are supported in HoloLens, but there's some work to set them up.

若要在应用购买功能中使用,你必须:To use the in app-purchase functionality, you must:

此 API 将显示 "常用 Windows 操作系统" 弹出窗口,其中显示了应用内购买名称、说明和价格。This API will bring up the stock Windows OS popup that shows the in-app purchase name, description, and price. 然后,用户可以选择 "购买选项"。The user can then choose purchase options. 操作完成后,应用将需要显示 UI,这允许用户切换回其 沉浸式视图Once the action is completed, the app will need to present UI, which allows the user to switch back to its immersive view.

对于面向基于桌面的 Windows Mixed Reality 沉浸式耳机的应用程序,无需在调用 RequestProductPurchaseAsync API 之前手动切换到 XAML 视图。For apps targeting desktop-based Windows Mixed Reality immersive headsets, it isn't required to manually switch to a XAML view before calling the RequestProductPurchaseAsync API.