Skip to content

Commit

Permalink
Release/7.0.0 (#1296)
Browse files Browse the repository at this point in the history
### Breaking Changes
* Support for Billing Client 6 (#1209) via Mark Villacampa
(@MarkVillacampa)
* Bump minimum sdk version to Android 4.4 (API level 19) (#1265) via
Mark Villacampa (@MarkVillacampa)
* in app messages support (#1290) via Andy Boedo (@aboedo)
### Bugfixes
* Add `awaitRestore` to customEntitlementComputation library (#1275) via
Toni Rico (@tonidero)
### Other Changes
* Future-proof in-app message APIs in case new types are added (#1293)
via Toni Rico (@tonidero)
* `Code style`: enabled `ALLOW_TRAILING_COMMA` (#1280) via NachoSoto
(@NachoSoto)
  • Loading branch information
MarkVillacampa committed Sep 28, 2023
1 parent 468a850 commit 04b973a
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ jobs:
command: sudo pip install awscli
- run:
name: Deploy to S3
command: aws s3 sync ~/project/docs/6.10.0-SNAPSHOT s3://purchases-docs/android/6.10.0-SNAPSHOT --delete
command: aws s3 sync ~/project/docs/7.0.0 s3://purchases-docs/android/7.0.0 --delete
- run:
name: Update index.html
command: aws s3 cp ~/project/docs/index.html s3://purchases-docs/android/index.html
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.10.0-SNAPSHOT
7.0.0
47 changes: 39 additions & 8 deletions CHANGELOG.latest.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
**RevenueCat Android SDK v7** is here!! 😻

This latest release updates the SDK to use BillingClient 6. This version of BillingClient brings little change compared
with BillingClient 5 which brought an entire new subscription model which resulted in large changes across the entire SDK.

The only modification at the API level involves replacing "ProrationMode" with "ReplacementMode". The specific replacement
modes remain unchanged.

If your app doesn't currently use DEFERRED replacement modes, then you should be safe to upgrade to this version without
changes in behavior.

If your app supports product changes using [DEFERRED replacement mode](https://www.revenuecat.com/docs/managing-subscriptions#google-play),
then you can either stick with the previous major version until support for DEFERRED is re-introduced in this major version,
or you can remove DEFERRED replacement options from your app.

See the [Android Native - 6.x to 7.x Migration](https://github.com/RevenueCat/purchases-android/blob/main/migrations/v7-MIGRATION.md) for more details.

If you come from an older version of the RevenueCat SDK, see [Android Native - 5.x to 6.x Migration](https://www.revenuecat.com/docs/android-native-5x-to-6x-migration)
for a more thorough explanation of the new Google subscription model announced with BillingClient 5 and how to take advantage of it.

### Bumped minimum Android SDK version

RevenueCat SDK v7 bumps minimum Android SDK version from Android 4.0 (API level 14) to Android 4.4 (API level 19).

### Support for Google Play InApp Messages

We've added support for [Google Play InApp Messages](https://rev.cat/googleplayinappmessaging) which will show users a snackbar message during grace period and account hold once per day and provide them an opportunity to fix their payment without leaving the app.

InApp Messages are shown by default. If you want to disable this behaviour during configuration of the RevenueCat SDK:

```kotlin
Purchases.configure(
PurchasesConfiguration.Builder(applicationContext, apiKey)
.showInAppMessagesAutomatically(false)
.build()
)
```

### Bugfixes
* Catch IllegalStateException and forward StoreProblemError (#1248) via Cesar de la Vega (@vegaro)
### Dependency Updates
* Bump fastlane from 2.215.1 to 2.216.0 (#1268) via dependabot[bot] (@dependabot[bot])
* Bump danger from 9.3.1 to 9.3.2 (#1260) via dependabot[bot] (@dependabot[bot])
* Bump fastlane from 2.214.0 to 2.215.1 (#1256) via dependabot[bot] (@dependabot[bot])
### Other Changes
* Improve offerings start log (#1225) via Toni Rico (@tonidero)
* Make sure to unmock mocked static methods after tests finished (#1205) via Mark Villacampa (@MarkVillacampa)
* Add `awaitRestore` to customEntitlementComputation library (#1275) via Toni Rico (@tonidero)
107 changes: 74 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
## 7.0.0
**RevenueCat Android SDK v7** is here!! 😻

This latest release updates the SDK to use BillingClient 6. This version of BillingClient brings little change compared
with BillingClient 5 which brought an entire new subscription model which resulted in large changes across the entire SDK.

The only modification at the API level involves replacing "ProrationMode" with "ReplacementMode". The specific replacement
modes remain unchanged.

If your app doesn't currently use DEFERRED replacement modes, then you should be safe to upgrade to this version without
changes in behavior.

If your app supports product changes using [DEFERRED replacement mode](https://www.revenuecat.com/docs/managing-subscriptions#google-play),
then you can either stick with the previous major version until support for DEFERRED is re-introduced in this major version,
or you can remove DEFERRED replacement options from your app.

See the [Android Native - 6.x to 7.x Migration](https://github.com/RevenueCat/purchases-android/blob/main/migrations/v7-MIGRATION.md) for more details.

If you come from an older version of the RevenueCat SDK, see [Android Native - 5.x to 6.x Migration](https://www.revenuecat.com/docs/android-native-5x-to-6x-migration)
for a more thorough explanation of the new Google subscription model announced with BillingClient 5 and how to take advantage of it.

### Bumped minimum Android SDK version

RevenueCat SDK v7 bumps minimum Android SDK version from Android 4.0 (API level 14) to Android 4.4 (API level 19).

### Support for Google Play InApp Messages

We've added support for [Google Play InApp Messages](https://rev.cat/googleplayinappmessaging) which will show users a snackbar message during grace period and account hold once per day and provide them an opportunity to fix their payment without leaving the app.

InApp Messages are shown by default. If you want to disable this behaviour during configuration of the RevenueCat SDK:

```kotlin
Purchases.configure(
PurchasesConfiguration.Builder(applicationContext, apiKey)
.showInAppMessagesAutomatically(false)
.build()
)
```

### Bugfixes
* Add `awaitRestore` to customEntitlementComputation library (#1275) via Toni Rico (@tonidero)
## 6.9.5
### Bugfixes
* Catch IllegalStateException and forward StoreProblemError (#1248) via Cesar de la Vega (@vegaro)
Expand Down Expand Up @@ -61,7 +102,7 @@
## 6.8.0
### New Features

Introduced Custom Entitlements Computation mode.
Introduced Custom Entitlements Computation mode.

This is new library intended for apps that will do their own entitlement computation separate from RevenueCat. It's distributed as a separate artifact in Maven.

Expand Down Expand Up @@ -377,7 +418,7 @@ For more control, create your `PurchaseParams.Builder` with the desired `Subscri

## 5.8.2

⚠️ ⚠️ ⚠️ ⚠️
⚠️ ⚠️ ⚠️ ⚠️

Our Android SDK versions 5.8.0 and 5.8.1 introduced a bug that prevented new purchase tokens from being sent to RevenueCat for validation between the above dates.

Expand Down Expand Up @@ -549,7 +590,7 @@ Users with pre-existing purchases are not affected.
* https://github.com/RevenueCat/purchases-android/pull/552
* Added a log when `autoSyncPurchases` is disabled
* https://github.com/RevenueCat/purchases-android/pull/555
* Attempt to reconnect to BillingClient when Billing response is error
* Attempt to reconnect to BillingClient when Billing response is error
* https://github.com/RevenueCat/purchases-android/pull/558


Expand Down Expand Up @@ -622,7 +663,7 @@ dependencies {
```

**⚠️ ⚠️ Important ⚠️ ⚠️** Observer mode for Amazon is not supported yet.

### Changelog

**Note:** This release is based off of 5.0.0-rc3. These are the changes compared to 5.0.0-rc3:
Expand Down Expand Up @@ -655,7 +696,7 @@ dependencies {
- Multiple updates on purchase-tester
https://github.com/RevenueCat/purchases-android/pull/481
https://github.com/RevenueCat/purchases-android/pull/493

## 5.0.0-rc2

- Disabled Amazon observer mode since it's not supported yet
Expand Down Expand Up @@ -689,7 +730,7 @@ dependencies {

- Added `exported` attribute to ResponseReceiver, for builds targeting SDK 31
https://github.com/RevenueCat/purchases-android/pull/404

## 4.6.0

- Added `EntitlementInfo.ownershipType`, which can be used to determine whether an entitlement was granted by a direct purchase or shared through a family member.
Expand Down Expand Up @@ -717,27 +758,27 @@ dependencies {

## 4.3.2

- Makes improvements to prevent multiple HTTP requests with the same parameters to `/identify` and `/alias`.
- Makes improvements to prevent multiple HTTP requests with the same parameters to `/identify` and `/alias`.
https://github.com/RevenueCat/purchases-android/pull/358
https://github.com/RevenueCat/purchases-android/pull/359

## 4.3.1

- Moves the code of `onBillingSetupFinished` to the main thread. Changes the callback of `canMakePayments` to the main thread.
- Moves the code of `onBillingSetupFinished` to the main thread. Changes the callback of `canMakePayments` to the main thread.
https://github.com/RevenueCat/purchases-android/pull/349/
https://github.com/RevenueCat/purchases-android/issues/348

## 4.3.0

### Identity V3:

In this version, we’ve redesigned the way that user identification works.
In this version, we’ve redesigned the way that user identification works.
Detailed docs about the new system are available [here](https://docs.revenuecat.com/v3.2/docs/user-ids).

#### New methods
- Introduces `logIn`, a new way of identifying users, which also returns whether a new user has been registered in the system.
`logIn` uses a new backend endpoint.
- Introduces `logOut`, a replacement for `reset`.
- Introduces `logIn`, a new way of identifying users, which also returns whether a new user has been registered in the system.
`logIn` uses a new backend endpoint.
- Introduces `logOut`, a replacement for `reset`.

#### Deprecations / removals
- deprecates `createAlias` in favor of `logIn`
Expand All @@ -750,7 +791,7 @@ Detailed docs about the new system are available [here](https://docs.revenuecat.
https://github.com/RevenueCat/purchases-android/pull/252


### Other changes:
### Other changes:
- Fixed CI issues with creating pull requests
https://github.com/RevenueCat/purchases-android/pull/324
- Re-enable eTags support to minimize unnecessary network traffic
Expand Down Expand Up @@ -844,48 +885,48 @@ Detailed docs about the new system are available [here](https://docs.revenuecat.
https://github.com/RevenueCat/purchases-android/pull/220
- Fixes incompatibilities with Mockito 1.x.x
https://github.com/RevenueCat/purchases-android/pull/228

## 4.0.0

- Removes Billing permission from AndroidManifest since it's added by the BillingClient.
https://github.com/RevenueCat/purchases-android/pull/211
- Fixes Deferred downgrades. The Purchase object in the completion block of `purchaseProduct` and `purchasePackage` is now nullable when changing products.
https://github.com/RevenueCat/purchases-android/pull/200
- Deprecated makePurchase and getEntitlements have been removed. Use purchaseProduct/purchasePackage and getOfferings instead.

## 3.5.3

- More aggressive caches and jittering for apps in background
- More aggressive caches and jittering for apps in background
https://github.com/RevenueCat/purchases-android/pull/201

## 3.5.2

- Catch IOException when getAdvertisingIdInfo
- Catch IOException when getAdvertisingIdInfo
https://github.com/RevenueCat/purchases-android/pull/197
- Updates BillingClient to 3.0.1
https://github.com/RevenueCat/purchases-android/pull/199
- Changes the way we deserialize the JSON "management_url" to prevent weird behavior
- Changes the way we deserialize the JSON "management_url" to prevent weird behavior
https://github.com/RevenueCat/purchases-android/pull/203
- Moved strings to their own module
- Moved strings to their own module
https://github.com/RevenueCat/purchases-android/pull/202
- Fixes dokka
https://github.com/RevenueCat/purchases-android/pull/205

## 3.5.1

- Fixes an issue where after calling invalidatePurchaserInfoCache and then purchaserInfoWithCompletion, the invalidated
- Fixes an issue where after calling invalidatePurchaserInfoCache and then purchaserInfoWithCompletion, the invalidated
cached version of purchaserInfo would be returned first, and only the delegate would get the updated version.
https://github.com/RevenueCat/purchases-android/pull/189
- Catch TimeoutException when calling getAdvertisingIdInfo
https://github.com/RevenueCat/purchases-android/pull/194

## 3.5.0
- Attribution V2:
- Deprecated `addAttribution` in favor of `setAdjustId`, `setAppsflyerId`, `setFbAnonymousId`, `setMparticleId`.
- Added support for OneSignal via `setOnesignalId`
- Added `setMediaSource`, `setCampaign`, `setAdGroup`, `setAd`, `setKeyword`, `setCreative`, and `collectDeviceIdentifiers`
https://github.com/RevenueCat/purchases-android/pull/184
- Fixed a RejectedExecutionException due to un-synchronized accesses to the ExecutorService
- Fixed a RejectedExecutionException due to un-synchronized accesses to the ExecutorService
https://github.com/RevenueCat/purchases-android/pull/179
- Fixed downgrades/upgrades https://github.com/RevenueCat/purchases-flutter/issues/93
https://github.com/RevenueCat/purchases-android/pull/179
Expand All @@ -902,7 +943,7 @@ https://github.com/RevenueCat/purchases-android/pull/172

## 3.3.0

- Added mParticle as one of the attribution options
- Added mParticle as one of the attribution options
https://github.com/RevenueCat/purchases-android/pull/163
- Added original_purchase_date to JSON response
https://github.com/RevenueCat/purchases-android/pull/164
Expand All @@ -913,17 +954,17 @@ https://github.com/RevenueCat/purchases-android/pull/167

## 3.2.0

- Added `proxyKey`, useful for kids category apps, so that they can set up a proxy to send requests through. **Do not use this** unless you've talked to RevenueCat support about it.
- Added `proxyKey`, useful for kids category apps, so that they can set up a proxy to send requests through. **Do not use this** unless you've talked to RevenueCat support about it.
https://github.com/RevenueCat/purchases-android/pull/152
https://github.com/RevenueCat/purchases-android/pull/157
- Added `managementURL` to purchaserInfo. This provides an easy way for apps to create Manage Subscription buttons that will correctly redirect users to the corresponding subscription management page on all platforms.
- Added `managementURL` to purchaserInfo. This provides an easy way for apps to create Manage Subscription buttons that will correctly redirect users to the corresponding subscription management page on all platforms.
https://github.com/RevenueCat/purchases-android/pull/151
- Extra fields sent to the post receipt endpoint: `normal_duration`, `intro_duration` and `trial_duration`. These will feed into the LTV model for more accurate LTV values.
- Extra fields sent to the post receipt endpoint: `normal_duration`, `intro_duration` and `trial_duration`. These will feed into the LTV model for more accurate LTV values.
https://github.com/RevenueCat/purchases-android/pull/148
https://github.com/RevenueCat/purchases-android/pull/156
- Fixed a bug where if the `context` passed to the SDK on setup is not an `Application` context, there is be a memory leak and potential issues getting the Advertising Info.
- Fixed a bug where if the `context` passed to the SDK on setup is not an `Application` context, there is be a memory leak and potential issues getting the Advertising Info.
https://github.com/RevenueCat/purchases-android/pull/147
- Migrated more classes to use Parcelize
- Migrated more classes to use Parcelize
https://github.com/RevenueCat/purchases-android/pull/150

## 3.1.1
Expand All @@ -939,7 +980,7 @@ https://github.com/RevenueCat/purchases-android/pull/150
## 3.1.0

- Another fix for NoSuchElementException when retrieving Advertising ID #124
- Added Subscriber Attributes, which allow developers to store additional, structured information
- Added Subscriber Attributes, which allow developers to store additional, structured information
for a user in RevenueCat. More info: https://docs.revenuecat.com/docs/user-attributes

## 3.0.7
Expand All @@ -956,7 +997,7 @@ for a user in RevenueCat. More info: https://docs.revenuecat.com/docs/user-attri
- Adds Fastlane to improve releases https://github.com/RevenueCat/purchases-android/pull/99
- Posts price and currency code for managed products https://github.com/RevenueCat/purchases-android/pull/96
- Adds platform flavor static variable https://github.com/RevenueCat/purchases-android/pull/91
- Fixes https://github.com/RevenueCat/purchases-android/issues/98
- Fixes https://github.com/RevenueCat/purchases-android/issues/98

## 3.0.4

Expand Down Expand Up @@ -997,7 +1038,7 @@ for a user in RevenueCat. More info: https://docs.revenuecat.com/docs/user-attri
## 2.4.0

- Fixes crash in `updatePendingPurchaseQueue` ([#81] (https://github.com/RevenueCat/purchases-android/pull/81))
- Deprecates activeEntitlements in RCPurchaserInfo and adds entitlements object to RCPurchaserInfo. For more info check out https://docs.revenuecat.com/docs/purchaserinfo
- Deprecates activeEntitlements in RCPurchaserInfo and adds entitlements object to RCPurchaserInfo. For more info check out https://docs.revenuecat.com/docs/purchaserinfo

## 2.3.1

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://sdk.revenuecat.com/android/6.10.0-SNAPSHOT/index.html" />
<meta http-equiv="refresh" content="0; url=https://sdk.revenuecat.com/android/7.0.0/index.html" />
</head>
<body>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
agp = "8.1.0"
androidxNavigation = "2.5.3"
kotlin = "1.7.20"
purchases = "6.10.0-SNAPSHOT"
purchases = "7.0.0"
lifecycle = "2.5.0"
androidxCore = "1.10.1"

Expand Down
2 changes: 1 addition & 1 deletion examples/MagicWeather/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
agp = "8.1.0"
androidxNavigation = "2.6.0"
kotlin = "1.9.0"
purchases = "6.10.0-SNAPSHOT"
purchases = "7.0.0"
lifecycle = "2.6.1"
androidxCore = "1.10.1"

Expand Down
2 changes: 1 addition & 1 deletion examples/MagicWeatherCompose/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
agp = "8.1.0"
androidxNavigation = "2.5.3"
kotlin = "1.7.21"
purchases = "6.10.0-SNAPSHOT"
purchases = "7.0.0"
lifecycle = "2.5.0"
androidxCore = "1.10.1"

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#Fri Mar 31 10:31:20 PDT 2023
GROUP=com.revenuecat.purchases

VERSION_NAME=6.10.0-SNAPSHOT
VERSION_NAME=7.0.0

POM_DESCRIPTION=Mobile subscriptions in hours, not months.
POM_URL=https://github.com/RevenueCat/purchases-android
Expand Down
2 changes: 1 addition & 1 deletion library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {
minSdkVersion obtainMinSdkVersion()
targetSdkVersion compileVersion
versionCode 1
versionName "6.10.0-SNAPSHOT"
versionName "7.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
Expand Down
Loading

0 comments on commit 04b973a

Please sign in to comment.