Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions purchases/api-defaults-bc7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ package com.revenuecat.purchases {
}

public final class Purchases {
method public void addUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener listener);
method public static void canMakePayments(android.content.Context context, com.revenuecat.purchases.interfaces.Callback<java.lang.Boolean> callback);
method public static void canMakePayments(android.content.Context context, optional java.util.List<? extends com.revenuecat.purchases.models.BillingFeature> features, com.revenuecat.purchases.interfaces.Callback<java.lang.Boolean> callback);
method public void close();
Expand Down Expand Up @@ -408,7 +409,7 @@ package com.revenuecat.purchases {
method @com.revenuecat.purchases.ExperimentalPreviewRevenueCatPurchasesAPI public void getStorefrontLocale(com.revenuecat.purchases.interfaces.GetStorefrontLocaleCallback callback);
method @Deprecated public void getSubscriptionSkus(java.util.List<java.lang.String> productIds, com.revenuecat.purchases.interfaces.GetStoreProductsCallback callback);
method @kotlin.jvm.JvmSynthetic public com.revenuecat.purchases.TrackedEventListener? getTrackedEventListener();
method @kotlin.jvm.Synchronized public com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? getUpdatedCustomerInfoListener();
method @Deprecated @kotlin.jvm.Synchronized public com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? getUpdatedCustomerInfoListener();
method public void getVirtualCurrencies(com.revenuecat.purchases.interfaces.GetVirtualCurrenciesCallback callback);
method public void invalidateCustomerInfoCache();
method public void invalidateVirtualCurrenciesCache();
Expand All @@ -427,7 +428,8 @@ package com.revenuecat.purchases {
method @Deprecated public void purchasePackage(android.app.Activity activity, com.revenuecat.purchases.Package packageToPurchase, com.revenuecat.purchases.interfaces.PurchaseCallback listener);
method @Deprecated public void purchaseProduct(android.app.Activity activity, com.revenuecat.purchases.models.StoreProduct storeProduct, com.revenuecat.purchases.interfaces.PurchaseCallback callback);
method public void redeemWebPurchase(com.revenuecat.purchases.WebPurchaseRedemption webPurchaseRedemption, com.revenuecat.purchases.interfaces.RedeemWebPurchaseListener listener);
method public void removeUpdatedCustomerInfoListener();
method @Deprecated public void removeUpdatedCustomerInfoListener();
method public void removeUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener listener);
method public void restorePurchases(com.revenuecat.purchases.interfaces.ReceiveCustomerInfoCallback callback);
method public void setAd(String? ad);
method public void setAdGroup(String? adGroup);
Expand Down Expand Up @@ -470,7 +472,7 @@ package com.revenuecat.purchases {
method public void setSolarEngineVisitorId(String? solarEngineVisitorId);
method public void setTenjinAnalyticsInstallationID(String? tenjinAnalyticsInstallationID);
method @kotlin.jvm.JvmSynthetic public void setTrackedEventListener(com.revenuecat.purchases.TrackedEventListener?);
method @kotlin.jvm.Synchronized public void setUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener?);
method @Deprecated @kotlin.jvm.Synchronized public void setUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener?);
method public void showInAppMessagesIfNeeded(android.app.Activity activity);
method public void showInAppMessagesIfNeeded(android.app.Activity activity, optional java.util.List<? extends com.revenuecat.purchases.models.InAppMessageType> inAppMessageTypes);
method @Deprecated public void syncAmazonPurchase(String productID, String receiptID, String amazonUserID, String? isoCurrencyCode, Double? price);
Expand Down Expand Up @@ -503,7 +505,7 @@ package com.revenuecat.purchases {
property @kotlin.jvm.Synchronized public final String? storefrontCountryCode;
property @com.revenuecat.purchases.ExperimentalPreviewRevenueCatPurchasesAPI public final java.util.Locale? storefrontLocale;
property @kotlin.jvm.JvmSynthetic public final com.revenuecat.purchases.TrackedEventListener? trackedEventListener;
property @kotlin.jvm.Synchronized public final com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? updatedCustomerInfoListener;
property @Deprecated @kotlin.jvm.Synchronized public final com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? updatedCustomerInfoListener;
field public static final com.revenuecat.purchases.Purchases.Companion Companion;
}

Expand Down
10 changes: 6 additions & 4 deletions purchases/api-defauts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ package com.revenuecat.purchases {
}

public final class Purchases {
method public void addUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener listener);
method public static void canMakePayments(android.content.Context context, com.revenuecat.purchases.interfaces.Callback<java.lang.Boolean> callback);
method public static void canMakePayments(android.content.Context context, optional java.util.List<? extends com.revenuecat.purchases.models.BillingFeature> features, com.revenuecat.purchases.interfaces.Callback<java.lang.Boolean> callback);
method public void close();
Expand Down Expand Up @@ -408,7 +409,7 @@ package com.revenuecat.purchases {
method @com.revenuecat.purchases.ExperimentalPreviewRevenueCatPurchasesAPI public void getStorefrontLocale(com.revenuecat.purchases.interfaces.GetStorefrontLocaleCallback callback);
method @Deprecated public void getSubscriptionSkus(java.util.List<java.lang.String> productIds, com.revenuecat.purchases.interfaces.GetStoreProductsCallback callback);
method @kotlin.jvm.JvmSynthetic public com.revenuecat.purchases.TrackedEventListener? getTrackedEventListener();
method @kotlin.jvm.Synchronized public com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? getUpdatedCustomerInfoListener();
method @Deprecated @kotlin.jvm.Synchronized public com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? getUpdatedCustomerInfoListener();
method public void getVirtualCurrencies(com.revenuecat.purchases.interfaces.GetVirtualCurrenciesCallback callback);
method public void invalidateCustomerInfoCache();
method public void invalidateVirtualCurrenciesCache();
Expand All @@ -427,7 +428,8 @@ package com.revenuecat.purchases {
method @Deprecated public void purchasePackage(android.app.Activity activity, com.revenuecat.purchases.Package packageToPurchase, com.revenuecat.purchases.interfaces.PurchaseCallback listener);
method @Deprecated public void purchaseProduct(android.app.Activity activity, com.revenuecat.purchases.models.StoreProduct storeProduct, com.revenuecat.purchases.interfaces.PurchaseCallback callback);
method public void redeemWebPurchase(com.revenuecat.purchases.WebPurchaseRedemption webPurchaseRedemption, com.revenuecat.purchases.interfaces.RedeemWebPurchaseListener listener);
method public void removeUpdatedCustomerInfoListener();
method @Deprecated public void removeUpdatedCustomerInfoListener();
method public void removeUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener listener);
method public void restorePurchases(com.revenuecat.purchases.interfaces.ReceiveCustomerInfoCallback callback);
method public void setAd(String? ad);
method public void setAdGroup(String? adGroup);
Expand Down Expand Up @@ -470,7 +472,7 @@ package com.revenuecat.purchases {
method public void setSolarEngineVisitorId(String? solarEngineVisitorId);
method public void setTenjinAnalyticsInstallationID(String? tenjinAnalyticsInstallationID);
method @kotlin.jvm.JvmSynthetic public void setTrackedEventListener(com.revenuecat.purchases.TrackedEventListener?);
method @kotlin.jvm.Synchronized public void setUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener?);
method @Deprecated @kotlin.jvm.Synchronized public void setUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener?);
method public void showInAppMessagesIfNeeded(android.app.Activity activity);
method public void showInAppMessagesIfNeeded(android.app.Activity activity, optional java.util.List<? extends com.revenuecat.purchases.models.InAppMessageType> inAppMessageTypes);
method @Deprecated public void syncAmazonPurchase(String productID, String receiptID, String amazonUserID, String? isoCurrencyCode, Double? price);
Expand Down Expand Up @@ -503,7 +505,7 @@ package com.revenuecat.purchases {
property @kotlin.jvm.Synchronized public final String? storefrontCountryCode;
property @com.revenuecat.purchases.ExperimentalPreviewRevenueCatPurchasesAPI public final java.util.Locale? storefrontLocale;
property @kotlin.jvm.JvmSynthetic public final com.revenuecat.purchases.TrackedEventListener? trackedEventListener;
property @kotlin.jvm.Synchronized public final com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? updatedCustomerInfoListener;
property @Deprecated @kotlin.jvm.Synchronized public final com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? updatedCustomerInfoListener;
field public static final com.revenuecat.purchases.Purchases.Companion Companion;
}

Expand Down
10 changes: 6 additions & 4 deletions purchases/api-entitlement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ package com.revenuecat.purchases {
}

public final class Purchases {
method public void addUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener listener);
method public static void canMakePayments(android.content.Context context, com.revenuecat.purchases.interfaces.Callback<java.lang.Boolean> callback);
method public static void canMakePayments(android.content.Context context, optional java.util.List<? extends com.revenuecat.purchases.models.BillingFeature> features, com.revenuecat.purchases.interfaces.Callback<java.lang.Boolean> callback);
method public void close();
Expand All @@ -358,16 +359,17 @@ package com.revenuecat.purchases {
method public static com.revenuecat.purchases.Purchases getSharedInstance();
method @kotlin.jvm.Synchronized public String? getStorefrontCountryCode();
method public void getStorefrontCountryCode(com.revenuecat.purchases.interfaces.GetStorefrontCallback callback);
method @kotlin.jvm.Synchronized public com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? getUpdatedCustomerInfoListener();
method @Deprecated @kotlin.jvm.Synchronized public com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? getUpdatedCustomerInfoListener();
method public static boolean isConfigured();
method public void purchase(com.revenuecat.purchases.PurchaseParams purchaseParams, com.revenuecat.purchases.interfaces.PurchaseCallback callback);
method public void removeUpdatedCustomerInfoListener();
method @Deprecated public void removeUpdatedCustomerInfoListener();
method public void removeUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener listener);
method public void restorePurchases(com.revenuecat.purchases.interfaces.ReceiveCustomerInfoCallback callback);
method @kotlin.jvm.Synchronized public static void setLogHandler(com.revenuecat.purchases.LogHandler);
method public static void setLogLevel(com.revenuecat.purchases.LogLevel);
method public static void setPlatformInfo(com.revenuecat.purchases.common.PlatformInfo);
method public static void setProxyURL(java.net.URL?);
method @kotlin.jvm.Synchronized public void setUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener?);
method @Deprecated @kotlin.jvm.Synchronized public void setUpdatedCustomerInfoListener(com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener?);
method public void showInAppMessagesIfNeeded(android.app.Activity activity);
method public void showInAppMessagesIfNeeded(android.app.Activity activity, optional java.util.List<? extends com.revenuecat.purchases.models.InAppMessageType> inAppMessageTypes);
method public void switchUser(String newAppUserID);
Expand All @@ -380,7 +382,7 @@ package com.revenuecat.purchases {
property public static final java.net.URL? proxyURL;
property public static final com.revenuecat.purchases.Purchases sharedInstance;
property @kotlin.jvm.Synchronized public final String? storefrontCountryCode;
property @kotlin.jvm.Synchronized public final com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? updatedCustomerInfoListener;
property @Deprecated @kotlin.jvm.Synchronized public final com.revenuecat.purchases.interfaces.UpdatedCustomerInfoListener? updatedCustomerInfoListener;
field public static final com.revenuecat.purchases.Purchases.Companion Companion;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@ public class Purchases internal constructor(
* The listener is responsible for handling changes to customer information.
* Make sure [removeUpdatedCustomerInfoListener] is called when the listener needs to be destroyed.
*/
@Deprecated(
"Use addUpdatedCustomerInfoListener/removeUpdatedCustomerInfoListener instead",
ReplaceWith("addUpdatedCustomerInfoListener(value!!)"),
)
public var updatedCustomerInfoListener: UpdatedCustomerInfoListener?
@Synchronized get() = purchasesOrchestrator.updatedCustomerInfoListener

@Synchronized set(value) {
@Suppress("DEPRECATION")
@Synchronized
get() =
purchasesOrchestrator.updatedCustomerInfoListener

@Suppress("DEPRECATION")
@Synchronized
set(value) {
purchasesOrchestrator.updatedCustomerInfoListener = value
}

Expand Down Expand Up @@ -131,9 +140,33 @@ public class Purchases internal constructor(
* Call this when you are finished using the [UpdatedCustomerInfoListener]. You should call this
* to avoid memory leaks.
*/
@Deprecated(
"Use removeUpdatedCustomerInfoListener(listener) instead",
ReplaceWith("removeUpdatedCustomerInfoListener(listener)"),
)
@Suppress("MemberVisibilityCanBePrivate")
public fun removeUpdatedCustomerInfoListener() {
purchasesOrchestrator.removeUpdatedCustomerInfoListener()
purchasesOrchestrator.removeLegacyUpdatedCustomerInfoListener()
}

/**
* Add a listener that will be called whenever customer info changes.
* Multiple listeners can be registered. The listener will immediately receive the latest
* cached customer info if available.
*
* Make sure to call [removeUpdatedCustomerInfoListener] when the listener is no longer needed
* to avoid memory leaks.
*/
public fun addUpdatedCustomerInfoListener(listener: UpdatedCustomerInfoListener) {
purchasesOrchestrator.addUpdatedCustomerInfoListener(listener)
}

/**
* Remove a previously added [UpdatedCustomerInfoListener]. Call this when you are finished
* using the listener to avoid memory leaks.
*/
public fun removeUpdatedCustomerInfoListener(listener: UpdatedCustomerInfoListener) {
purchasesOrchestrator.removeUpdatedCustomerInfoListener(listener)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,19 @@ public class Purchases internal constructor(
* The listener is responsible for handling changes to customer information.
* Make sure [removeUpdatedCustomerInfoListener] is called when the listener needs to be destroyed.
*/
@Deprecated(
"Use addUpdatedCustomerInfoListener/removeUpdatedCustomerInfoListener instead",
ReplaceWith("addUpdatedCustomerInfoListener(value!!)"),
)
public var updatedCustomerInfoListener: UpdatedCustomerInfoListener?
@Synchronized get() = purchasesOrchestrator.updatedCustomerInfoListener

@Synchronized set(value) {
@Suppress("DEPRECATION")
@Synchronized
get() =
purchasesOrchestrator.updatedCustomerInfoListener

@Suppress("DEPRECATION")
@Synchronized
set(value) {
purchasesOrchestrator.updatedCustomerInfoListener = value
}

Expand Down Expand Up @@ -605,9 +614,33 @@ public class Purchases internal constructor(
* Call this when you are finished using the [UpdatedCustomerInfoListener]. You should call this
* to avoid memory leaks.
*/
@Deprecated(
"Use removeUpdatedCustomerInfoListener(listener) instead",
ReplaceWith("removeUpdatedCustomerInfoListener(listener)"),
)
@Suppress("MemberVisibilityCanBePrivate")
public fun removeUpdatedCustomerInfoListener() {
purchasesOrchestrator.removeUpdatedCustomerInfoListener()
purchasesOrchestrator.removeLegacyUpdatedCustomerInfoListener()
}

/**
* Add a listener that will be called whenever customer info changes.
* Multiple listeners can be registered. The listener will immediately receive the latest
* cached customer info if available.
*
* Make sure to call [removeUpdatedCustomerInfoListener] when the listener is no longer needed
* to avoid memory leaks.
*/
public fun addUpdatedCustomerInfoListener(listener: UpdatedCustomerInfoListener) {
purchasesOrchestrator.addUpdatedCustomerInfoListener(listener)
}

/**
* Remove a previously added [UpdatedCustomerInfoListener]. Call this when you are finished
* using the listener to avoid memory leaks.
*/
public fun removeUpdatedCustomerInfoListener(listener: UpdatedCustomerInfoListener) {
purchasesOrchestrator.removeUpdatedCustomerInfoListener(listener)
}

/**
Expand Down
Loading