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

## 2.7.11

## Enhancements
- Improved startup performance and reduced blockage of caller threads
- Add `PaywallOptions.preloadDeviceOverrides` - this allows you to override `shouldPreload` for different device tiers, i.e. disable it for low-end devices. For more details, see KDoc.

## Fixes
- Reduce CookieManager ANR potential
- Fix concurrency issues with double onFinished calls being invoked

## 2.7.10

## Potentially impactful changes
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 @@ -42,4 +42,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.10" repoUrl="https://github.com/superwall/Superwall-Android" />
<SdkLatestVersion version="2.7.11" 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 @@ -20,16 +20,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.10"
implementation "com.superwall.sdk:superwall-android:2.7.11"
```

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

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

// And in your build.gradle.kts
dependencies {
Expand Down
13 changes: 13 additions & 0 deletions content/docs/android/sdk-reference/PaywallOptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Customize how paywalls look and behave, including preload behavior, alerts, dism

## Signature
```kotlin
import com.superwall.sdk.analytics.Tier
import kotlin.time.Duration

class PaywallOptions {
Expand All @@ -26,6 +27,7 @@ class PaywallOptions {

var shouldShowPurchaseFailureAlert: Boolean = true
var shouldPreload: Boolean = true
var preloadDeviceOverrides: Map<Tier, Boolean> = emptyMap()
var useCachedTemplates: Boolean = false
var automaticallyDismiss: Boolean = true

Expand Down Expand Up @@ -77,6 +79,11 @@ class PaywallOptions {
description: "Preloads and caches trigger paywalls and products during SDK initialization. Set to `false` for just-in-time loading.",
default: "true",
},
preloadDeviceOverrides: {
type: "Map<Tier, Boolean>",
description: "Overrides `shouldPreload` for specific device tiers. Any tier not listed here falls back to `shouldPreload`.",
default: "emptyMap()",
},
useCachedTemplates: {
type: "Boolean",
description: "Loads paywall template websites from disk when available.",
Expand Down Expand Up @@ -121,6 +128,10 @@ val paywallOptions = PaywallOptions().apply {
isHapticFeedbackEnabled = true
shouldShowPurchaseFailureAlert = false
shouldPreload = true
preloadDeviceOverrides = mapOf(
Tier.ULTRA_LOW to false,
Tier.LOW to false,
)
useCachedTemplates = false
automaticallyDismiss = true
transactionBackgroundView = PaywallOptions.TransactionBackgroundView.SPINNER
Expand Down Expand Up @@ -148,5 +159,7 @@ Superwall.configure(
)
```

`preloadDeviceOverrides` is useful when you want to keep preloading enabled by default but disable it on lower-end devices. Tiers you do not specify continue to use the `shouldPreload` value.

## Related
- [`SuperwallOptions`](/android/sdk-reference/SuperwallOptions)
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 @@ -15,4 +15,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.10" repoUrl="https://github.com/superwall/Superwall-Android" />
<SdkLatestVersion version="2.7.11" repoUrl="https://github.com/superwall/Superwall-Android" />
Loading