-
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)
-
checkAlternativeBillingAvailability
@Deprecated(message = Use isBillingProgramAvailable with BillingProgramAndroid.ExternalOffer instead) abstract Boolean checkAlternativeBillingAvailability()
-
showAlternativeBillingInformationDialog
@Deprecated(message = Use launchExternalLink instead) abstract Boolean showAlternativeBillingInformationDialog(Activity activity)
-
createAlternativeBillingReportingToken
@Deprecated(message = Use createBillingProgramReportingDetails with BillingProgramAndroid.ExternalOffer instead) abstract String createAlternativeBillingReportingToken()
-
setUserChoiceBillingListener
abstract Unit setUserChoiceBillingListener(UserChoiceBillingListener listener)
-
addUserChoiceBillingListener
abstract Unit addUserChoiceBillingListener(OpenIapUserChoiceBillingListener listener)
-
removeUserChoiceBillingListener
abstract Unit removeUserChoiceBillingListener(OpenIapUserChoiceBillingListener listener)
-
setDeveloperProvidedBillingListener
abstract Unit setDeveloperProvidedBillingListener(DeveloperProvidedBillingListener listener)
Set a legacy-style developer-provided billing listener for External Payments (8.3.0+ Japan only). This is called when user selects developer billing in the side-by-side choice dialog.
- Parameters:
listener- Developer-provided billing listener or null to remove
-
addDeveloperProvidedBillingListener
abstract Unit addDeveloperProvidedBillingListener(OpenIapDeveloperProvidedBillingListener listener)
Add listener for developer-provided billing selection events. Called when user selects the developer's billing option in external payments flow.
-
removeDeveloperProvidedBillingListener
abstract Unit removeDeveloperProvidedBillingListener(OpenIapDeveloperProvidedBillingListener listener)
-
isBillingProgramAvailable
abstract BillingProgramAvailabilityResultAndroid isBillingProgramAvailable(BillingProgramAndroid program)
Check if a billing program is available for this user/device. Replaces checkAlternativeBillingAvailability() for external offers.
- Parameters:
program- The billing program to check (EXTERNAL_CONTENT_LINK or EXTERNAL_OFFER)
-
createBillingProgramReportingDetails
abstract BillingProgramReportingDetailsAndroid createBillingProgramReportingDetails(BillingProgramAndroid program)
Create reporting details for transactions made outside of Google Play Billing. Replaces createAlternativeBillingReportingToken() for external offers.
- Parameters:
program- The billing program (EXTERNAL_CONTENT_LINK or EXTERNAL_OFFER)
-
launchExternalLink
abstract Boolean launchExternalLink(Activity activity, LaunchExternalLinkParamsAndroid params)
Launch an external link for external offer or app download. Replaces showAlternativeBillingInformationDialog() for external offers.
- Parameters:
activity- Current activity contextparams- Parameters for the external link
-
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()
-
getValidateReceipt
abstract SuspendFunction1<VerifyPurchaseProps, VerifyPurchaseResult> getValidateReceipt()
-
getVerifyPurchase
abstract SuspendFunction1<VerifyPurchaseProps, VerifyPurchaseResult> getVerifyPurchase()
-
getVerifyPurchaseWithProvider
abstract SuspendFunction1<VerifyPurchaseWithProviderProps, VerifyPurchaseWithProviderResult> getVerifyPurchaseWithProvider()
-
getQueryHandlers
abstract QueryHandlers getQueryHandlers()
-
getMutationHandlers
abstract MutationHandlers getMutationHandlers()
-
getSubscriptionHandlers
abstract SubscriptionHandlers getSubscriptionHandlers()
-
-
-
-