public interface

# InAppPurchase

com.google.android.gms.ads.purchase.InAppPurchase

## Class Overview

Contains information about a purchase.

## Summary

Constants
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 Methods
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 (0x00000002)

#### public static final int RESOLUTION_FAILURE

A resolution indicating the purchase failed.

Constant Value: 0 (0x00000000)

#### public static final int RESOLUTION_INVALID_PRODUCT

A resolution indicating the product is invalid.

Constant Value: 3 (0x00000003)

#### public static final int RESOLUTION_SUCCESS

A resolution indicating the purchase was successful.

Constant Value: 1 (0x00000001)

## 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`