locked
[UWP]IAP expired time RRS feed

  • Question

  • Is there a way to find out the expiration date of durable IAPs that have a product liftime for let's say 30 days?

    Also, when those 30 days have expired, will that IAP just not be returned by storeContext.GetUserCollectionAsync() any more?

    Thursday, February 2, 2017 11:11 PM

Answers

  • Hi T.Partl,

    >>Is there a way to find out the expiration date of durable IAPs that have a product liftime for let's say 30 days?

    We can use the StoreLicense.ExpirationDate property to get the expiration date for the durable IAP, for more information please check the following code:

     StoreAppLicense appLicense = await storeContext.GetAppLicenseAsync();
     foreach (KeyValuePair<string, StoreLicense> item in appLicense.AddOnLicenses)
                {
                    StoreLicense addOnLicense = item.Value;
                    if (addOnLicense.IsActive)
                    {
                        
                      MyExpireDataTextBlock.Text = "ExpiredTime is " + (item.Value.ExpirationDate.Date - DateTime.Now.Date).Days+"Day";
                         
                    }
               }

    >>Also, when those 30 days have expired, will that IAP just not be returned by storeContext.GetUserCollectionAsync() any more?

    Yes, once the durable IAP has expired, it should not be returned by storeContext.GetUserCollectionAsync() any more. This storeContext.GetUserCollectionAsync() method is used to get Windows Store info for the add-ons of the current app for which the user has entitlements to use.

    Thanks,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, February 6, 2017 7:09 AM