Consumable Products

Because a consumable product can be bought over and over, it doesn’t have the same concept of a license that is either active or not. Nor does it have the concept of an expiration date. Therefore, the code shown previously in the “Determining Whether a Product Has Been Purchased” section for durable products does not apply to consumable products. You must implement your own tracking for what the user has purchased and how many. This also means that it’s up to you to roam the virtual goods to other devices, if that’s something you want to support. Fortunately, Windows makes it easy to roam small amounts of data, as explained in Chapter 19, “Working with Data.”

As for initiating a consumable product purchase, the same RequestProductPurchaseAsync ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.