InAppPurchaseListener | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
public interface

# InAppPurchaseListener

com.google.android.gms.ads.purchase.InAppPurchaseListener

## Class Overview

A listener interface for In-App Purchase triggered by ads. The ad can trigger an In-App Purchase with an `InAppPurchase` containing product id(SKU). The application then decides how to conduct the purchase.

## Summary

Public Methods
abstract void | onInAppPurchaseRequested(InAppPurchase inAppPurchase) Called when the user clicks an In-App purchase ad.

## Public Methods

#### public abstract void onInAppPurchaseRequested (InAppPurchase inAppPurchase)

Called when the user clicks an In-App purchase ad. The publisher is responsible for starting an In-App purchase flow, and calling `recordResolution(int)` or `recordPlayBillingResolution(int)` when the In-App purchase flow is completed to report the resolution.

##### Parameters

inAppPurchase | The `InAppPurchase` containing the information about the purchase.