ProductLicense class

ProductLicense class

Provides info about a license that is associated with an add-on (also called an in-app product or IAP).

Syntax


Public NotInheritable Class ProductLicense

Members

The ProductLicense class has these types of members:

Properties

The ProductLicense class has these properties.

PropertyAccess typeDescription

ExpirationDate

Read-only

Gets the current expiration date and time of the add-on (also called an in-app product or IAP) license.

IsActive

Read-only

Indicates if the add-on (also called an in-app product or IAP) license is currently active.

IsConsumable

Read-only

Indicates if the add-on (also called an in-app product or IAP) is consumable. A consumable add-on can be purchased, used, and purchased again.

ProductId

Read-only

Gets the ID of an add-on (also called an in-app product or IAP). This ID is used by the app to get info about the product or feature that is enabled when the customer buys it through an in-app purchase.

 

Remarks

The ProductLicenses property of the LicenseInformation object contains one or more instances of this object.

Examples

The following code example demonstrates how to use this object to get the expiration date of an add-on offer.

No code example is currently available or this language may not be supported.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel.Store
Windows::ApplicationModel::Store [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel.Store
Windows::ApplicationModel::Store [C++]

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

See also

Object
Store sample (UWP)
Trial app and in-app purchase sample (Windows 8.1)
Enable in-app product purchases

 

 

Show:
© 2016 Microsoft