CurrentApp class

1 out of 3 rated this helpful - Rate this topic

Defines methods and properties you can use to get license and listing info about the current app and perform in-app purchases.

Note  This 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.

Syntax


public ref class CurrentApp abstract sealed : Object

Attributes

MarshalingBehaviorAttribute(Agile)
StaticAttribute(Windows.ApplicationModel.Store.ICurrentApp, NTDDI_WIN8)
ThreadingAttribute(Both)
VersionAttribute(NTDDI_WIN8)

Members

The CurrentApp class has these types of members:

Methods

The CurrentApp class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetAppReceiptAsync Requests all receipts for this app and any in-app purchases.
GetProductReceiptAsync Requests the receipt for the productId specified.
LoadListingInformationAsync Loads the app's listing information asynchronously. Implements the IAsyncInfo interface.
LoadListingInformationByKeywordsAsync Windows Phone only. Loads the app listing information asynchronously, returning features and products in the ProductListings collection that match all supplied keywords. Implements the IAsyncInfo interface.
LoadListingInformationByProductIdsAsync Windows Phone only. Loads the app listing information asynchronously, returning features and products in the ProductListings collection that match any of the given products IDs. Implements the IAsyncInfo interface.
ReportProductFulfillment Windows Phone only. Notifies the marketplace that the application has delivered the paid-for goods to the user. You cannot repurchase a product until you have confirmed its delivery using this method
RequestAppPurchaseAsync Creates the async operation that enables the user to buy a full license for the current app.
RequestProductPurchaseAsync Creates the async operation that will display the UI that is used to make an in-app purchase from the Windows Store.

 

Properties

The CurrentApp class has these properties.

PropertyAccess typeDescription

AppId

Read-onlyThe ID of the app that is created by the Windows Store.

LicenseInformation

Read-onlyGets the license metadata for the current app.

LinkUri

Read-onlyGets the Uniform Resource Identifier (URI) of the app's listing page in the web catalog of the Windows Store.

 

Remarks

This object obtains its information from the Windows Store.

Requirements

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

See also

Trial app and in-app purchase sample

 

 

Build date: 2/25/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.