LicenseInformation class

LicenseInformation class

Provides access to the current app's license metadata.

Syntax


/* For information about creating or accessing this object, see Remarks. */

Members

The LicenseInformation class has these types of members:

Events

The LicenseInformation class has these events.

EventDescription
LicenseChanged Raises a notification event when the status of the app's license changes.

 

Properties

The LicenseInformation class has these properties.

PropertyAccess typeDescription

ExpirationDate

Read-only

Gets the license expiration date and time relative to the system clock.

IsActive

Read-only

Gets a value that indicates whether the license is active.

IsTrial

Read-only

Gets a value that indicates whether the license is a trial license.

ProductLicenses

Read-only

Gets the associative list of licenses for in-app products that a user is currently entitled to.

 

Remarks

For app trial versions of an app, IsActive will return true so long as the trial hasn’t expired. During the trial period the IsTrial returns true; returning false when the customer upgrades to the full version of the app.

You access this object through the LicenseInformation property of the CurrentAppSimulator object during testing, or the LicenseInformation property of the CurrentApp object when the app is distributed through the Windows Store.

Note  The CurrentApp object obtains its data from the Windows Store, which requires that you have a Windows Store developer account and that the app has been published in the Windows Store. If you don't have a Windows Store developer account, you can test the functions of this class by using the CurrentAppSimulator.
 

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:
© 2017 Microsoft