-
public final class CommonKt
-
-
Method Summary
Modifier and Type Method Description final static UnitsetAllowSharingAppStoreAccount(Boolean allowSharingAppStoreAccount)final static UnitgetOfferings(OnResult onResult)final static UnitgetCurrentOfferingForPlacement(String placementIdentifier, OnNullableResult onResult)final static UnitsyncAttributesAndOfferingsIfNeeded(OnResult onResult)final static UnitgetProductInfo(List<String> productIDs, String type, OnResultList onResult)final static UnitpurchaseProduct(Activity activity, String productIdentifier, String type, String googleBasePlanId, String googleOldProductId, Integer googleReplacementModeInt, Boolean googleIsPersonalizedPrice, Map<String, Object> presentedOfferingContext, OnResult onResult)final static UnitpurchasePackage(Activity activity, String packageIdentifier, Map<String, Object> presentedOfferingContext, String googleOldProductId, Integer googleReplacementModeInt, Boolean googleIsPersonalizedPrice, OnResult onResult)final static UnitpurchaseSubscriptionOption(Activity activity, String productIdentifier, String optionIdentifier, String googleOldProductId, Integer googleReplacementModeInt, Boolean googleIsPersonalizedPrice, Map<String, Object> presentedOfferingContext, OnResult onResult)final static StringgetAppUserID()final static <ERROR CLASS>getStorefront(Function1<Map<String, Object>, Unit> callback)final static UnitrestorePurchases(OnResult onResult)final static UnitlogIn(String appUserID, OnResult onResult)final static UnitlogOut(OnResult onResult)final static UnitsetDebugLogsEnabled(Boolean enabled)final static UnitsetLogLevel(String level)final static UnitsetLogHandler(Function1<Map<String, String>, Unit> callback)Sets a log handler and forwards all logs to completion function. final static UnitsetLogHandlerWithOnResult(OnResult onResult)Sets a log handler and forwards all logs to completion function. final static UnitsetProxyURLString(String proxyURLString)final static StringgetProxyURLString()final static UnitgetCustomerInfo(OnResult onResult)final static UnitsyncPurchases()final static UnitsyncPurchases(OnResult onResult)final static BooleanisAnonymous()final static UnitsetPurchasesAreCompletedBy(String purchasesAreCompletedBy)final static Map<String, Map<String, Object>>checkTrialOrIntroductoryPriceEligibility(List<String> productIdentifiers)final static UnitinvalidateCustomerInfoCache()final static UnitcanMakePayments(Context context, List<Integer> features, OnResultAny<Boolean> onResult)final static UnitgetAmazonLWAConsentStatus(OnResultAny<Boolean> onResult)final static UnitshowInAppMessagesIfNeeded(Activity activity, List<InAppMessageType> inAppMessageTypes)final static UnitshowInAppMessagesIfNeeded(Activity activity)final static Unitconfigure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings, Boolean shouldShowInAppMessagesAutomatically, String verificationMode, Boolean pendingTransactionsForPrepaidPlansEnabled, Boolean diagnosticsEnabled)final static Unitconfigure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings, Boolean shouldShowInAppMessagesAutomatically, String verificationMode, Boolean pendingTransactionsForPrepaidPlansEnabled)final static Unitconfigure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings, Boolean shouldShowInAppMessagesAutomatically, String verificationMode)final static Unitconfigure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings, Boolean shouldShowInAppMessagesAutomatically)final static Unitconfigure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings)final static Unitconfigure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store)final static Unitconfigure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo)final static Unitconfigure(Context context, String apiKey, String appUserID, PlatformInfo platformInfo)final static ErrorContainergetPromotionalOffer()final static BooleanisWebPurchaseRedemptionURL(String urlString)final static UnitredeemWebPurchase(String urlString, OnResult onResult)-
-
Method Detail
-
setAllowSharingAppStoreAccount
@Deprecated(message = Replaced with configuration in the RevenueCat dashboard, replaceWith = @ReplaceWith(imports = {}, expression = configure through the RevenueCat dashboard)) final static Unit setAllowSharingAppStoreAccount(Boolean allowSharingAppStoreAccount)
-
getOfferings
final static Unit getOfferings(OnResult onResult)
-
getCurrentOfferingForPlacement
final static Unit getCurrentOfferingForPlacement(String placementIdentifier, OnNullableResult onResult)
-
syncAttributesAndOfferingsIfNeeded
final static Unit syncAttributesAndOfferingsIfNeeded(OnResult onResult)
-
getProductInfo
final static Unit getProductInfo(List<String> productIDs, String type, OnResultList onResult)
-
purchaseProduct
final static Unit purchaseProduct(Activity activity, String productIdentifier, String type, String googleBasePlanId, String googleOldProductId, Integer googleReplacementModeInt, Boolean googleIsPersonalizedPrice, Map<String, Object> presentedOfferingContext, OnResult onResult)
-
purchasePackage
final static Unit purchasePackage(Activity activity, String packageIdentifier, Map<String, Object> presentedOfferingContext, String googleOldProductId, Integer googleReplacementModeInt, Boolean googleIsPersonalizedPrice, OnResult onResult)
-
purchaseSubscriptionOption
final static Unit purchaseSubscriptionOption(Activity activity, String productIdentifier, String optionIdentifier, String googleOldProductId, Integer googleReplacementModeInt, Boolean googleIsPersonalizedPrice, Map<String, Object> presentedOfferingContext, OnResult onResult)
-
getAppUserID
final static String getAppUserID()
-
getStorefront
final static <ERROR CLASS> getStorefront(Function1<Map<String, Object>, Unit> callback)
-
restorePurchases
final static Unit restorePurchases(OnResult onResult)
-
setDebugLogsEnabled
@Deprecated(message = Use setLogLevel instead) final static Unit setDebugLogsEnabled(Boolean enabled)
-
setLogLevel
final static Unit setLogLevel(String level)
-
setLogHandler
final static Unit setLogHandler(Function1<Map<String, String>, Unit> callback)
Sets a log handler and forwards all logs to completion function.
- Parameters:
callback- Gets a map with two keys, alogLevelwhich is one of the`LogLevel`name uppercased, and amessage, with the log message.
-
setLogHandlerWithOnResult
final static Unit setLogHandlerWithOnResult(OnResult onResult)
Sets a log handler and forwards all logs to completion function. Accepts an OnResult so it can be used from SDKs that don't have Kotlin configured, since they would error because Kotlin's Function1 would not be found. Function1 is what Kotlin lambdas are converted to. It has a different name than setLogHandler because naming it the same also gives errors due of missing Function1.
- Parameters:
onResult- Gets a map with two keys, alogLevelwhich is one of the`LogLevel`name uppercased, and amessage, with the log message.
-
setProxyURLString
final static Unit setProxyURLString(String proxyURLString)
-
getProxyURLString
final static String getProxyURLString()
-
getCustomerInfo
final static Unit getCustomerInfo(OnResult onResult)
-
syncPurchases
final static Unit syncPurchases()
-
syncPurchases
final static Unit syncPurchases(OnResult onResult)
-
isAnonymous
final static Boolean isAnonymous()
-
setPurchasesAreCompletedBy
final static Unit setPurchasesAreCompletedBy(String purchasesAreCompletedBy)
-
checkTrialOrIntroductoryPriceEligibility
final static Map<String, Map<String, Object>> checkTrialOrIntroductoryPriceEligibility(List<String> productIdentifiers)
-
invalidateCustomerInfoCache
final static Unit invalidateCustomerInfoCache()
-
canMakePayments
final static Unit canMakePayments(Context context, List<Integer> features, OnResultAny<Boolean> onResult)
-
getAmazonLWAConsentStatus
final static Unit getAmazonLWAConsentStatus(OnResultAny<Boolean> onResult)
-
showInAppMessagesIfNeeded
@JvmOverloads() final static Unit showInAppMessagesIfNeeded(Activity activity, List<InAppMessageType> inAppMessageTypes)
-
showInAppMessagesIfNeeded
@JvmOverloads() final static Unit showInAppMessagesIfNeeded(Activity activity)
-
configure
@JvmOverloads() final static Unit configure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings, Boolean shouldShowInAppMessagesAutomatically, String verificationMode, Boolean pendingTransactionsForPrepaidPlansEnabled, Boolean diagnosticsEnabled)
-
configure
@JvmOverloads() final static Unit configure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings, Boolean shouldShowInAppMessagesAutomatically, String verificationMode, Boolean pendingTransactionsForPrepaidPlansEnabled)
-
configure
@JvmOverloads() final static Unit configure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings, Boolean shouldShowInAppMessagesAutomatically, String verificationMode)
-
configure
@JvmOverloads() final static Unit configure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings, Boolean shouldShowInAppMessagesAutomatically)
-
configure
@JvmOverloads() final static Unit configure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store, DangerousSettings dangerousSettings)
-
configure
@JvmOverloads() final static Unit configure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo, Store store)
-
configure
@JvmOverloads() final static Unit configure(Context context, String apiKey, String appUserID, String purchasesAreCompletedBy, PlatformInfo platformInfo)
-
configure
@JvmOverloads() final static Unit configure(Context context, String apiKey, String appUserID, PlatformInfo platformInfo)
-
getPromotionalOffer
final static ErrorContainer getPromotionalOffer()
-
isWebPurchaseRedemptionURL
final static Boolean isWebPurchaseRedemptionURL(String urlString)
-
redeemWebPurchase
final static Unit redeemWebPurchase(String urlString, OnResult onResult)
-
-
-
-