InAppPurchase

public interface InAppPurchase

Contains information about a purchase.

Constant Summary

int RESOLUTION_CANCELED A resolution indicating the purchase was canceled.
int RESOLUTION_FAILURE A resolution indicating the purchase failed.
int RESOLUTION_INVALID_PRODUCT A resolution indicating the product is invalid.
int RESOLUTION_SUCCESS A resolution indicating the purchase was successful.

Public Method Summary

abstract String
getProductId()
Returns the product ID (SKU).
abstract void
recordPlayBillingResolution(int billingResponseCode)
Records the purchase status and conversion events for a play billing purchase.
abstract void
recordResolution(int resolution)
Records the purchase status and conversion events.

Constants

public static final int RESOLUTION_CANCELED

A resolution indicating the purchase was canceled.

Constant Value: 2

public static final int RESOLUTION_FAILURE

A resolution indicating the purchase failed.

Constant Value: 0

public static final int RESOLUTION_INVALID_PRODUCT

A resolution indicating the product is invalid.

Constant Value: 3

public static final int RESOLUTION_SUCCESS

A resolution indicating the purchase was successful.

Constant Value: 1

Public Methods

public abstract String getProductId ()

Returns the product ID (SKU).

public abstract void recordPlayBillingResolution (int billingResponseCode)

Records the purchase status and conversion events for a play billing purchase. If this method is not called, conversion events will be lost.

If the purchase is made fulfilled by a billing service other than Google Play billing, use recordResolution(int) instead.

The Google Conversion Tracking SDK is required to report conversion events.

Parameters
billingResponseCode The result of a play billing purchase. The value can be any billing response code from

public abstract void recordResolution (int resolution)

Records the purchase status and conversion events. If this method is not called, conversion events will be lost.

If the purchase is made fulfilled by Google Play billing, use recordPlayBillingResolution(int) instead.

The Google Conversion Tracking SDK is required to report conversion events.

Parameters
resolution The result of a purchase. The value can be RESOLUTION_SUCCESS, RESOLUTION_FAILURE, RESOLUTION_INVALID_PRODUCT or RESOLUTION_CANCELED

Send feedback about...

Need help? Visit our support page.