ListingInformation class

ListingInformation class

Provides the listing info that describes the app in the Windows Store.

Syntax


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

Members

The ListingInformation class has these types of members:

Properties

The ListingInformation class has these properties.

PropertyAccess typeDescription

AgeRating

Read-only

Gets the age rating for the app.

CurrencyCode

Read-only

Gets the currency code associated with the user's market, such as USD or CAD.

CurrentMarket

Read-only

Gets the country code associated with the user's location, such as US or CA, that is used to identify their market for transactions in the current session.

Description

Read-only

Gets the app's description in the current market.

FormattedBasePrice

Read-only

Gets the app's base price formatted for the current market and currency.

FormattedPrice

Read-only

Gets the app's purchase price formatted for the current market and currency.

IsOnSale

Read-only

Gets a value that indicates whether the app is on sale.

Name

Read-only

Gets the app's name in the current market.

ProductListings

Read-only

Gets information about add-ons (also called in-app products or IAPs) available for purchase.

SaleEndDate

Read-only

Gets the end date of the sale period for the app.

 

Remarks

The info that this object returns comes from the listing info you enter when you submit the app to the Windows Store.

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

Note  The CurrentApp object obtains its data from the Windows Store, so you must have a Windows Store developer account and the app must be 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.
 

Examples

This code example shows how to get the ListingInformation from simulated app data and then get the ProductListing object for one of the features offered by the app.


// get current app object using the simulator interface
currentApp = Windows.ApplicationModel.Store.CurrentAppSimulator;

// get the listing information for the products this app supports
currentApp.loadListingInformationAsync().then(
    function (listing) {
        // loadListingInformationAsync returns the ListingInformation object in listing.
        // get one of the listing properties
        thisAppsPrice = listing.formattedPrice;
    }
);


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
ProductListing
ProductListings

 

 

Show:
© 2016 Microsoft