logPurchaseWithCurrencyWithPriceAndQuantity

This method logs all application purchase events and their metadata on the Hurree platform. Users can view analytics from the Insights screen on the Hurree dashboard.

Returns true if the log is successfully added, and false in case of failure.

  • Once application purchase events are logged, marketers can view these compiled analytics from the Insights screen.
  • For example, marketers can view, compare, download or print Campaign Performance statistics for individual campaigns, by App and by App Group.

Method Signature

boolean logPurchaseWithCurrencyWithPriceAndQuantity(String productIdentifier, String currencyCode, String price, int quantity)

To add the method

  1. Open your project.
  2. Open app > src > main > java > package name > MainActivity.
  3. Add the method code: Method Code

Arguments

These are the arguments that define the method.

Name Type Mandatory Description
productIdentifier String Mandatory This is the name of the purchased product. It is returned by the iTunes store.
currencyCode String Mandatory This is the currency code, represented as an ISO 4217 (http://www.xe.com/iso4217.php).
price String Mandatory This is the price. It is identical to that of the SKProduct class returned value.
quantity Integer Optional This is the quantity of the purchased product.

Sample Code

Analytics.getInstance(this).logPurchaseWithCurrencyWithPriceAndQuantity(
        "T-Shirt",
        "GBP",
        "10.00",
        1
);

results matching ""

    No results matching ""