-
public interface OpenIapProtocolShared contract implemented by platform-specific OpenIAP billing modules. Provides access to generated handler typealiases so the store can remain provider-agnostic.
-
-
Method Summary
-
-
Method Detail
-
setActivity
abstract Unit setActivity(Activity activity)
-
addPurchaseUpdateListener
abstract Unit addPurchaseUpdateListener(OpenIapPurchaseUpdateListener listener)
-
removePurchaseUpdateListener
abstract Unit removePurchaseUpdateListener(OpenIapPurchaseUpdateListener listener)
-
addPurchaseErrorListener
abstract Unit addPurchaseErrorListener(OpenIapPurchaseErrorListener listener)
-
removePurchaseErrorListener
abstract Unit removePurchaseErrorListener(OpenIapPurchaseErrorListener listener)
-
addUserChoiceBillingListener
abstract Unit addUserChoiceBillingListener(OpenIapUserChoiceBillingListener listener)
-
removeUserChoiceBillingListener
abstract Unit removeUserChoiceBillingListener(OpenIapUserChoiceBillingListener listener)
-
addDeveloperProvidedBillingListener
abstract Unit addDeveloperProvidedBillingListener(OpenIapDeveloperProvidedBillingListener listener)
Add listener for developer-provided billing selection events. Called when the user selects the developer's option in an enabled billing program.
-
removeDeveloperProvidedBillingListener
abstract Unit removeDeveloperProvidedBillingListener(OpenIapDeveloperProvidedBillingListener listener)
-
addSubscriptionBillingIssueListener
abstract Unit addSubscriptionBillingIssueListener(OpenIapSubscriptionBillingIssueListener listener)
Add listener for subscription billing-issue events. Fires once per session when a subscription is observed with isSuspended == true.
Play flavor: populated via Purchase.isSuspended (Billing 8.1+).
Horizon flavor: NEVER fires. The Horizon Billing Compatibility SDK targets Play Billing 7.0 which does not expose a suspended-subscription signal.
-
removeSubscriptionBillingIssueListener
abstract Unit removeSubscriptionBillingIssueListener(OpenIapSubscriptionBillingIssueListener listener)
-
isBillingProgramAvailable
abstract BillingProgramAvailabilityResultAndroid isBillingProgramAvailable(BillingProgramAndroid program)
Check if a billing program is available for this user/device. Checks whether the selected billing program is available.
- Parameters:
program- The billing program to check, including BILLING_CHOICE on 9.1.
-
createBillingProgramReportingDetails
abstract BillingProgramReportingDetailsAndroid createBillingProgramReportingDetails(BillingProgramAndroid program, DeveloperBillingTypeAndroid developerBillingType)
Create reporting details for transactions made outside of Google Play Billing. Creates reporting details for the selected billing program.
- Parameters:
program- The billing program, including BILLING_CHOICE on 9.1.
-
launchExternalLink
abstract Boolean launchExternalLink(Activity activity, LaunchExternalLinkParamsAndroid params)
Launch an external link for external offer or app download. Launches the selected external-link flow.
- Parameters:
activity- Current activity contextparams- Parameters for the external link
-
getBillingChoiceInfo
abstract BillingChoiceInfoAndroid getBillingChoiceInfo(GetBillingChoiceInfoParamsAndroid params)
Fetch Play Billing choice display assets for developer-rendered Billing Choice.
-
showBillingProgramInformationDialog
abstract BillingResultAndroid showBillingProgramInformationDialog(Activity activity, BillingProgramInformationDialogParamsAndroid params)
Show the mandatory information dialog before a developer-rendered, in-app Billing Choice screen.
-
showInAppMessages
abstract InAppMessageResultAndroid showInAppMessages(Activity activity, InAppMessageParamsAndroid params)
Show Play billing in-app messages such as payment issues or price-change confirmations.
-
openRedeemOfferCode
abstract Boolean openRedeemOfferCode(Activity activity)
Open the Google Play offer/promo code redemption page so the user can enter a code. A listener can receive the redeemed purchase while the app has an active billing connection; reconcile available purchases when the app resumes. Does not require the billing client to be initialized.
- Parameters:
activity- Current activity context
-
getInitConnection
abstract SuspendFunction1<InitConnectionConfig, Boolean> getInitConnection()
-
getEndConnection
abstract SuspendFunction0<Boolean> getEndConnection()
-
getFetchProducts
abstract SuspendFunction1<ProductRequest, FetchProductsResult> getFetchProducts()
-
getGetAvailablePurchases
abstract SuspendFunction1<PurchaseOptions, List<Purchase>> getGetAvailablePurchases()
-
getGetActiveSubscriptions
abstract SuspendFunction1<List<String>, List<ActiveSubscription>> getGetActiveSubscriptions()
-
getHasActiveSubscriptions
abstract SuspendFunction1<List<String>, Boolean> getHasActiveSubscriptions()
-
getRequestPurchase
abstract SuspendFunction1<RequestPurchaseProps, RequestPurchaseResult> getRequestPurchase()
-
getFinishTransaction
abstract SuspendFunction2<Purchase, Boolean, Unit> getFinishTransaction()
-
getAcknowledgePurchaseAndroid
abstract SuspendFunction1<String, Boolean> getAcknowledgePurchaseAndroid()
-
getConsumePurchaseAndroid
abstract SuspendFunction1<String, Boolean> getConsumePurchaseAndroid()
-
getRestorePurchases
abstract SuspendFunction0<Unit> getRestorePurchases()
-
getDeepLinkToSubscriptions
abstract SuspendFunction1<DeepLinkOptions, Unit> getDeepLinkToSubscriptions()
-
getVerifyPurchase
abstract SuspendFunction1<VerifyPurchaseProps, VerifyPurchaseResult> getVerifyPurchase()
-
getVerifyPurchaseWithProvider
abstract SuspendFunction1<VerifyPurchaseWithProviderProps, VerifyPurchaseWithProviderResult> getVerifyPurchaseWithProvider()
-
getQueryHandlers
abstract QueryHandlers getQueryHandlers()
-
getMutationHandlers
abstract MutationHandlers getMutationHandlers()
-
getSubscriptionHandlers
abstract SubscriptionHandlers getSubscriptionHandlers()
-
-
-
-