docs.unity3d.com
    Show / Hide Table of Contents

    Class CurrentApp

    Wrapper class for the Windows Store API CurrentApp class.

    Inheritance
    Object
    CurrentApp
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Purchasing.Default
    Syntax
    public class CurrentApp : ICurrentApp

    Properties

    LicenseInformation

    Read access to the current app's license metadata.

    Declaration
    public LicenseInformation LicenseInformation { get; }
    Property Value
    Type Description
    LicenseInformation

    Methods

    BuildMockProducts(List<WinProductDescription>)

    Dummy function implementing the building of Mock Products.

    Declaration
    public void BuildMockProducts(List<WinProductDescription> products)
    Parameters
    Type Name Description
    List<WinProductDescription> products

    The list of product descriptions.

    GetUnfulfilledConsumablesAsync()

    Returns a list of purchased consumable in-app products that have not been reported to the Microsoft Store as fulfilled..

    Declaration
    public IAsyncOperation<IReadOnlyList<UnfulfilledConsumable>> GetUnfulfilledConsumablesAsync()
    Returns
    Type Description
    IAsyncOperation<IReadOnlyList<UnfulfilledConsumable>>

    The list of purchased consumable products that have not been reported as fulfilled.

    LoadListingInformationAsync()

    Loads the app's listing information asynchronously. Additionally, the listing information for available in-app products is also provided.

    Declaration
    public IAsyncOperation<ListingInformation> LoadListingInformationAsync()
    Returns
    Type Description
    IAsyncOperation<ListingInformation>

    The ListingInformation that contains info (ex: name, price) specific to the market the user currently resides in.

    ReportConsumableFulfillmentAsync(String, Guid)

    Notifies the Microsoft Store that the purchase of a consumable add-on (also called an in-app product or IAP) is fulfilled and that the user has the right to access the content.

    Declaration
    public IAsyncOperation<FulfillmentResult> ReportConsumableFulfillmentAsync(string productId, Guid transactionId)
    Parameters
    Type Name Description
    String productId

    The product ID of the consumable add-on to report as fulfilled.

    Guid transactionId

    The transaction ID for the purchase of the consumable add-on.

    Returns
    Type Description
    IAsyncOperation<FulfillmentResult>

    An async operation for a FulfillmentResult value that indicates the status for the consumable add-on.

    RequestAppReceiptAsync()

    Requests all receipts for the purchase of the app and any in-app products.

    Declaration
    public IAsyncOperation<string> RequestAppReceiptAsync()
    Returns
    Type Description
    IAsyncOperation<String>

    An async operation for an XML-formatted string containing all receipt information for the purchases of the app and of its products..

    RequestProductPurchaseAsync(String)

    Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store.

    Declaration
    public IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(string productId)
    Parameters
    Type Name Description
    String productId

    The product ID of the add-on to purchase.

    Returns
    Type Description
    IAsyncOperation<PurchaseResults>

    An async operation for a PurchaseResults containing the results of the product purchase request.

    RequestProductReceiptAsync(String)

    Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store.

    Declaration
    public IAsyncOperation<string> RequestProductReceiptAsync(string productId)
    Parameters
    Type Name Description
    String productId

    The product ID of the add-on to purchase.

    Returns
    Type Description
    IAsyncOperation<String>

    An async operation for a string providing in-app transaction details for the provided productId.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023