InAppMessageListener

Receives the outcome of a Play in-app messaging surface shown by AppPurchase.showInAppMessages.

In-app messages are how Google Play recovers subscriptions whose payment was declined: Play shows the user a fix-your-payment-method flow inside your app. If the user resolves the problem, Play returns the token of the recovered purchase and the subscription becomes active again — so the app must refresh its entitlement state when onSubscriptionRecovered fires.

Callbacks are delivered on the main thread.

Since

4.4.0

Functions

Link copied to clipboard
abstract fun onNoActionNeeded()

Called when Play had nothing to show, or the user dismissed the message without changing anything. No entitlement change occurred.

Link copied to clipboard
abstract fun onSubscriptionRecovered(purchaseToken: String)

Called when Play displayed a message and the user recovered a subscription that was in a payment-declined state.