Releases: apphud/ApphudSDK-Android
Releases · apphud/ApphudSDK-Android
v2.4.2
v2.4.0
What's New in v2.4.0:
This version is recommended for update.
- Enhanced Error Handling: There are now significant improvements in error handling, especially for scenarios when there is no internet connection on the device.
- Paywalls Fallback Enhancements: Internal improvements to the Paywalls Fallback mode.
- API Updates:
- Renamed method
placementsDidLoadCallback(callback: (List<ApphudPlacement>) -> Unit)tofetchPlacements(callback: (List<ApphudPlacement>, ApphudError?) -> Unit). The updated method now returns an optional error. Refer to theApphudErrordocumentation for more details. - The method
paywallsDidLoadCallback(callback: (List<ApphudPaywall>, ApphudError?) -> Unit)has been updated to return an optional error.
- Renamed method
- Guaranteed Response for Paywalls and Placements: All methods that fetch paywalls or placements are now designed to ensure a response under all circumstances, even in cases of errors or when Google Billing is unavailable.
- ApphudError Class Improvements: The
ApphudErrorclass has been improved to potentially include Google Billing error codes. - [IMPORTANT] Subscription Purchase Update: Apphud will now attempt to purchase a subscription even if an
offerTokenis not provided in the purchase method. The SDK will attempt to fetch the first available offer token and initiate the purchase with it. - [IMPORTANT] Renamed Methods: The method
refreshEntitlementshas been renamed torefreshUserData.
v2.3.9
2.3.6
2.3.2
2.3.0
What's New in Apphud SDK 2.3.0
- Placements: Offers a strategic method to integrate paywalls throughout your app. This feature allows developers to position paywalls effectively in different app sections, such as onboarding, settings, etc., targeting distinct user audiences. For more comprehensive information, please refer to our Placements guide.
- New Callback in
Apphud.start(...): Added an optional callback toApphud.start(...)method that returns anApphudUserobject. - [Breaking] Removed the
variationNameproperty from theApphudPaywallobject to avoid misleading usage. - New Methods:
- Added
suspend fun placements(): List<ApphudPlacement>to retrieve an array ofApphudPlacementobjects with their inner Google Play products. - Added
suspend fun placement(identifier: String): ApphudPlacement?to retrieve a specific placement by identifier. - Added
fun placementsDidLoadCallback(callback: (List<ApphudPlacement>) -> Unit)as an alternative method to retrieve placements with their inner Google Play products in a callback. - Added
fun rawPlacements(): List<ApphudPlacement>to retrieve placements immediately, without waiting for Google Play products to load. - Added
fun rawPaywalls(): List<ApphudPaywall>to retrieve paywalls immediately, without waiting for Google Play products to load.
- Added
- [Breaking] Suspendable Methods:
- Made
suspend fun paywalls(): List<ApphudPaywall>suspendable. - Made
suspend fun paywall(identifier: String): ApphudPaywall?suspendable.
- Made
ApphudListener
- [Breaking] Renamed the method
fun userDidLoad()tofun userDidLoad(user: ApphudUser). - New Listener Method: Added
fun placementsDidFullyLoad(placements: List<ApphudPlacement>).
2.2.3
Updated Dependencies. SDK updated its dependencies to more current versions.
2.2.0
What's new in v2.2.0:
- Support for Google Billing Client 6.1.0. Apphud SDK has been updated to work with the latest version of Google's billing library.
- Added
basePlanIdandsubscriptionOffers()inApphudProductclass. This allows developers to distinguish between different Apphud Products that have the same Product Id but different Base Plan Ids. ThesubscriptionOffers()function allows to fetch offers related to the product's base plan. - Removed
variationNamefromApphudPaywall. This property was potentially causing confusion or incorrect usage, so it was removed to streamline the functionality of theApphudPaywall. - Updated Dependencies. SDK updated its dependencies to more current versions.
2.1.0
- Added paywalls fallback mode. Just add a Paywalls JSON file to the resources folder, which will be used as a fallback in rare case of Apphud unavailability. JSON file can be downloaded from Apphud Products Hub.
- Added a method to make a purchase by product id.
- Added an option to choose between acknowledging or consuming in-app products in a purchase method.
- Added a method fun userCanceled(): Boolean to ApphudPurchaseResult
- SDK will not try to fetch AD_ID if permission is missing.
- Internal refactors
2.0.0
What's new in 2.0.0:
- Google Play Billing 5
Android SDK migration guide:
- apphudFetchSkuDetailsProducts(details: List) changed to apphudFetchProductDetails(details: List)
- removed purchaseWithoutValidation(activity: Activity, productId: String, block: ((ApphudPurchaseResult) -> Unit)?)
- removed purchaseWithoutValidation(activity: Activity, details: SkuDetails, block: ((ApphudPurchaseResult) -> Unit)?) =
ApphudInternal.purchase(activity,null, details, null, false, block) - removed purchase(activity: Activity, details: SkuDetails, block: ((ApphudPurchaseResult) -> Unit)?)
- removed purchase(activity: Activity, productId: String, block: ((ApphudPurchaseResult) -> Unit)?)
- removed purchase(activity: Activity, product: ApphudProduct, block: ((ApphudPurchaseResult) -> Unit)?)
- added purchase(activity: Activity,
product: ApphudProduct,
offerIdToken: String? = null,
block: ((ApphudPurchaseResult) -> Unit)?) - product(productIdentifier: String): SkuDetails? changed to product(productIdentifier: String): ProductDetails?
- productsFetchCallback(callback: (List) -> Unit) changed to productsFetchCallback(callback: (List) -> Unit)
- products(): List? changed to products(): List?
- trackPurchase(purchase: Purchase, skuProduct: SkuDetails, paywallIdentifier: String? = null) changed to trackPurchase(purchase: Purchase, productDetails: ProductDetails, offerIdToken: String?, paywallIdentifier: String? = null)