Skip to content
Merged
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
17 changes: 17 additions & 0 deletions content/docs/android/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ title: "Changelog"
description: "Release notes for the Superwall Android SDK"
---

## 2.7.20

## Enhancements

- Adds `storeFrontCountryCode` property
- Adds `PaywallOptions.loadingColor` to options enabling you to theme the circular progress bar
Comment thread
dcrawbuck marked this conversation as resolved.

## Fixes
- Fix a bug causing web redemption entitlements to be ignored in restoration tracking logic for users of purchase controller

## 2.7.19

## Enhancements

- Added `EventTrackingBehavior` enum and `SuperwallOptions.eventTrackingBehavior` property for GDPR-compliant event collection control. Use `ALL` (default) to track everything, `SUPERWALL_ONLY` to suppress user-initiated tracking, trigger fires, and user-attribute updates while keeping internal SDK events, or `NONE` to stop all event collection entirely. The behavior can also be changed at runtime via `Superwall.instance.eventTrackingBehavior`.
Comment thread
dcrawbuck marked this conversation as resolved.
- Deprecated `SuperwallOptions.isExternalDataCollectionEnabled`. Setting it to `false` now maps to `SUPERWALL_ONLY`; setting it back to `true` maps to `ALL`.

## 2.7.18

## Enhancements
Expand Down
2 changes: 1 addition & 1 deletion content/docs/android/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ If you have feedback on any of our docs, please leave a rating and message at th

If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/superwall-android/issues).

<SdkLatestVersion version="2.7.18" repoUrl="https://github.com/superwall/Superwall-Android" />
<SdkLatestVersion version="2.7.20" repoUrl="https://github.com/superwall/Superwall-Android" />
6 changes: 3 additions & 3 deletions content/docs/android/quickstart/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ can find the [latest release here](https://github.com/superwall/Superwall-Androi
<CodeGroup>

```gradle build.gradle
implementation "com.superwall.sdk:superwall-android:2.7.18"
implementation "com.superwall.sdk:superwall-android:2.7.20"
Comment thread
dcrawbuck marked this conversation as resolved.
```

```kotlin build.gradle.kts
implementation("com.superwall.sdk:superwall-android:2.7.18")
implementation("com.superwall.sdk:superwall-android:2.7.20")
```

```toml libs.version.toml
[libraries]
superwall-android = { group = "com.superwall.sdk", name = "superwall-android", version = "2.7.18" }
superwall-android = { group = "com.superwall.sdk", name = "superwall-android", version = "2.7.20" }

// And in your build.gradle.kts
dependencies {
Expand Down
7 changes: 7 additions & 0 deletions content/docs/android/sdk-reference/PaywallOptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class PaywallOptions {
var transactionBackgroundView: TransactionBackgroundView? = TransactionBackgroundView.SPINNER

var overrideProductsByName: Map<String, String> = emptyMap()
var loadingColor: Int? = null // @ColorRes
var optimisticLoading: Boolean = false
var timeoutAfter: Duration? = null
var onBackPressed: ((PaywallInfo?) -> Boolean)? = null
Expand Down Expand Up @@ -189,6 +190,11 @@ class PaywallOptions {
description: "Overrides products on all paywalls using name\u2192identifier mapping (e.g., `\"primary\"` \u2192 `\"com.example.premium_monthly\"`).",
required: true,
},
loadingColor: {
type: "Int?",
description: "A `@ColorRes` used to tint the spinner shown while a purchase or restoration is in progress. Only applies to the SDK's built-in loading view; style a custom `PaywallBuilder.purchaseLoadingView` directly instead.",
default: "null",
},
optimisticLoading: {
type: "Boolean",
description: "Hides shimmer optimistically.",
Expand Down Expand Up @@ -224,6 +230,7 @@ val paywallOptions = PaywallOptions().apply {
"primary" to "com.example.premium_monthly",
"tertiary" to "com.example.premium_annual",
)
loadingColor = R.color.brand_purple
optimisticLoading = false
timeoutAfter = null
onBackPressed = { paywallInfo ->
Expand Down
11 changes: 10 additions & 1 deletion content/docs/android/sdk-reference/SuperwallOptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ class SuperwallOptions {
var paywalls: PaywallOptions = PaywallOptions()
var shouldObservePurchases: Boolean = false
var networkEnvironment: NetworkEnvironment = NetworkEnvironment.Release()
var eventTrackingBehavior: EventTrackingBehavior = EventTrackingBehavior.ALL
@Deprecated("Use eventTrackingBehavior instead.")
var isExternalDataCollectionEnabled: Boolean = true
var localeIdentifier: String? = null
var isGameControllerEnabled: Boolean = false
Expand All @@ -122,6 +124,8 @@ public class SuperwallOptions {
public PaywallOptions paywalls = new PaywallOptions();
public boolean shouldObservePurchases = false;
public NetworkEnvironment networkEnvironment = new NetworkEnvironment.Release();
public EventTrackingBehavior eventTrackingBehavior = EventTrackingBehavior.ALL;
@Deprecated
public boolean isExternalDataCollectionEnabled = true;
public @Nullable String localeIdentifier = null;
public boolean isGameControllerEnabled = false;
Expand Down Expand Up @@ -152,9 +156,14 @@ public class SuperwallOptions {
description: "Overrides the API environment. **Only change if instructed by Superwall.**",
required: true,
},
eventTrackingBehavior: {
type: "EventTrackingBehavior",
description: "Controls which SDK events are sent to Superwall. `ALL` tracks everything, `SUPERWALL_ONLY` suppresses user-initiated tracking, trigger fires, and user-attribute updates, and `NONE` stops all event collection. Can also be changed at runtime via `Superwall.instance.eventTrackingBehavior`.",
default: "ALL",
},
isExternalDataCollectionEnabled: {
type: "Boolean",
description: "Allows Superwall to send non-paywall analytics events to the backend.",
description: "Deprecated. Use `eventTrackingBehavior` instead. Setting this to `false` maps to `SUPERWALL_ONLY`; setting it back to `true` maps to `ALL`.",
default: "true",
},
localeIdentifier: {
Expand Down
2 changes: 1 addition & 1 deletion content/docs/android/sdk-reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ If you have feedback on any of our docs, please leave a rating and message at th

If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/superwall-android/issues).

<SdkLatestVersion version="2.7.18" repoUrl="https://github.com/superwall/Superwall-Android" />
<SdkLatestVersion version="2.7.20" repoUrl="https://github.com/superwall/Superwall-Android" />
22 changes: 19 additions & 3 deletions content/shared/configuring/using-superwalloptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,19 @@ After updating to an SDK and paywall runtime that supports this behavior, re-sav

:::android

Android currently uses `isExternalDataCollectionEnabled`. Setting it to `false` suppresses user-initiated tracking, trigger-fire events, and user-attribute updates while keeping internal Superwall event collection enabled.
On Android SDK `2.7.19` and later, use `eventTrackingBehavior`:

| Behavior | What Superwall sends |
| --- | --- |
| `EventTrackingBehavior.ALL` | All SDK event collection is enabled. This is the default. |
| `EventTrackingBehavior.SUPERWALL_ONLY` | Internal Superwall events continue to be sent, but user-initiated `Superwall.track(...)` calls, trigger-fire events, and user-attribute updates are suppressed. |
| `EventTrackingBehavior.NONE` | No SDK events are sent to Superwall. Paywalls still work because paywall logic runs on device, but dashboard analytics, attribution matching, and audience rules that depend on `acquisition_*` attributes will not receive this event data. |

Set the initial behavior before calling `configure()`:

```kotlin
val options = SuperwallOptions()
options.isExternalDataCollectionEnabled = false
options.eventTrackingBehavior = EventTrackingBehavior.NONE

Superwall.configure(
this,
Expand All @@ -370,11 +378,19 @@ Superwall.configure(
// Or using the configuration DSL
configureSuperwall("MY_API_KEY") {
options {
isExternalDataCollectionEnabled = false
eventTrackingBehavior = EventTrackingBehavior.NONE
}
}
```

You can also change the behavior at runtime after the SDK is configured. This is useful when a user changes a privacy or consent setting in your app.

```kotlin
Superwall.instance.eventTrackingBehavior = EventTrackingBehavior.NONE
```

`isExternalDataCollectionEnabled` is deprecated on Android SDK `2.7.19` and later. If older code sets it to `false`, the SDK maps that to `SUPERWALL_ONLY`, not `NONE`. Use `NONE` when your app needs to stop SDK event collection entirely.

:::

:::flutter
Expand Down
Loading