> For the complete documentation index, see [llms.txt](https://docs.sfbx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sfbx.io/help/release-notes/android/unifiedsdk.md).

# UnifiedSDK

## Release Notes

***

## Version 6.3.1 - July 20, 2026

### Highlights

**More reliable consent screen on activity recreation** Screen rotation (and other activity recreations) no longer drops consent callbacks or duplicates the consent screen — see Bug Fixes below. No integration change is required.

### Improvements

* **Faster preferences screen (layer 2).** Optimised display flow with finer handling of the current consent state — the preferences screen opens faster. No integration change is required.
* **Ongoing quality and reliability improvements.** Continuous internal hardening to keep the SDK stable across devices — fully transparent to your integration.

### Bug Fixes

* **Consent callbacks no longer lost on screen rotation.** `onCmpDisplayed` / `onCmpNotDisplayed` / `onCmpClosed` are now delivered reliably, exactly once, even if the device is rotated while the consent screen is open.
* **No more duplicate consent screen.** With integrations that re-trigger the notice on activity recreation (e.g. re-running `initialize()` + `presentNotice()` after a rotation), requesting it again while it is already open no longer stacks a second screen nor re-fires its callbacks.
* **Extra (non-IAB) vendor consent is now filtered correctly.** A fix keeps the IAB consent data in sync with the dedicated filter methods for the extra vendors configured on your source, so their allowed state reads back as expected. No user re-consent and no integration change is required.

### Upgrade Notes

No integration changes are required — update the `io.sfbx.appconsent:unifiedsdk` version to `6.3.1` and you are done. The public API is unchanged; the consent-callback reliability fix and the extra-vendor read fix are both transparent to your code.

***

## Version 6.3.0 - June 15, 2026

### Highlights

**Your app stays visible behind the consent screen** When the CMP is displayed, the area around the consent UI is now transparent, so your app remains visible underneath instead of being hidden behind an opaque background. This gives a smoother, more integrated transition when the notice appears and closes. The consent screen itself — its layout, content and behaviour — is unchanged, and no integration change is required. If you want to change the color of the overlay, configure it from the “notice” in your dashboard

**Improved IAB TCF v2 conformance** The SDK now surfaces `IABTCF_DisclosedVendors` to downstream ad providers — a standard IAB-spec preference key indicating, per session, which vendors were actually disclosed to the user in the CMP UI. Ad SDKs that read this key from `SharedPreferences` (as per the IAB CMP API v2 spec) will now find a populated value alongside the existing TCF keys.

In parallel, the SDK aligns with the latest IAB spec by no longer tracking `IABTCF_UseNonStandardStacks` as a first-class typed preference — it has been deprecated by the IAB in favour of `IABTCF_UseNonStandardTexts` (already supported by the SDK). If your CMP web configuration still emits the legacy key, it will be stored as a plain `String` in `SharedPreferences` instead of being silently dropped.

### Improvements

* **Cleaner logs.** Errors that the SDK catches and handles internally are no longer logged at error level on every layer they pass through. A given failure is now logged once, at the boundary where it is reported to your app (via `onCmpOnError`), instead of producing repeated error lines in Logcat. This removes the noisy "log-and-rethrow" behaviour some teams reported.
* **Lighter, leaner SDK.** Internal restructuring of the SDK's modules reduces packaging overhead and streamlines dependency resolution, with no change to the integration surface. As always, the SDK ships with no third-party runtime dependencies.

### Upgrade Notes

No integration changes are required — update the `io.sfbx.appconsent:unifiedsdk` version and you are done. The new consent-screen background behaviour, the IAB TCF improvements, the logging changes and the internal restructuring are all transparent to your code.

Ad SDKs that already read the standard IAB TCF SharedPreferences keys will automatically benefit from the new `IABTCF_DisclosedVendors` value at the next consent save.

***

## Version 6.2.0 — June 02, 2026

### Highlights

**Lighter classpath** The SDK no longer depends on Jetpack Compose to render its consent screens, so Compose is no longer pulled into your app's dependency graph as a transitive dependency of the SDK. Apps that experienced obscure Compose-version-misalignment crashes triggered by an outdated Compose pin shipped by the SDK should see that entire class of issues disappear.

**Crash protection for downstream ad SDKs reading IAB TCF metadata** The IAB-mandated integer TCF keys (`IABTCF_CmpSdkID`, `IABTCF_CmpSdkVersion`, `IABTCF_PolicyVersion`, `IABTCF_gdprApplies`, `IABTCF_PurposeOneTreatment`, `IABTCF_UseNonStandardTexts`) are now stored as `Int` in `SharedPreferences`, as required by the IAB CMP API v2 spec. A one-shot retroactive migration runs at the next SDK init and fixes the prefs for users who already gave consent under the old behaviour — **no user re-consent required, and the consent string itself (`IABTCF_TCString`) is untouched**.

### Improvements

* **Faster vendor modal after the first open.** The vendor-detail `WebView` inside the consent screen is now created lazily on the first vendor click and kept alive across subsequent open/close cycles for the duration of the consent activity. The \~200–400 ms WebView and renderer-process bootstrap is paid once per session instead of once per vendor click.

### Bug Fixes

* Fixed a re-entrant emission inside the vendor modal dismissal sequence — under certain timing conditions, closing the modal programmatically could trigger two close events back-to-back.
* Fixed layout overlap with system bars in landscape on devices where the 3-button navigation bar is mounted on the side (or where gesture indicators sit on the left/right). The consent screen and the vendor sheet now reserve space for **all** system bars instead of only the top/bottom ones — previously, vendor footers and the sheet's rounded background could bleed under the side nav bar.

### Upgrade Notes

No code changes required on the integrator side. If your app uses Jetpack Compose, the SDK no longer interferes with the Compose version your app resolves to — version alignment is now entirely under your control.

The IAB TCF metadata migration runs automatically at the next SDK init for affected users — no integrator action required.

***

## Version 6.1.0 — May 12, 2026

{% hint style="warning" %}
Although this release ships as a **minor version**, two integration points have changed and require small adjustments in your app code
{% endhint %}

### Breaking Changes

1. **`onCmpClosed` and `onCmpNotDisplayed` callbacks now expose an optional reason.** Both signatures gain a single `AppconsentExceptions?` parameter — `null` for a normal flow, non-null when the callback was triggered by an error condition (offline, host unreachable, etc.). Adjust your lambdas to accept the parameter.
2. **Five new `AppconsentExceptions` subclasses** are introduced (see *Richer error reporting* below). If your error handling matches `AppconsentExceptions` **exhaustively** in a `when`, add the new branches.

{% hint style="info" %}
*Apps that don't match `AppconsentExceptions` exhaustively, and that already ignore the (previously zero) arguments of `onCmpClosed` / `onCmpNotDisplayed`, need no code change at all.*
{% endhint %}

### Highlights

**Improved offline detection** Airplane mode and loss of internet connectivity are now detected proactively. The SDK responds to consent actions immediately when the device is offline — without waiting for long network timeouts. End users get a faster, clearer experience, and your app receives an explicit error it can react to (for instance, to display a retry action).

**Richer error reporting** Five new error types let your app distinguish between specific failure modes instead of guessing from a generic timeout:

* *no network at all*, *the consent server is unreachable*, and *an unexpected connectivity issue* — for the offline / network family;
* *the backend rejected the save call* — the server-side error payload is now propagated to your code instead of being swallowed by a timeout;
* *a CMP JS bridge callback failed* — surfaces the underlying reason from the webview, useful for diagnostics when the consent UI signals an issue.

The CMP close / not-displayed callbacks also carry an optional reason — so your app can pick the right next step (retry, fallback, ignore…) without polling the SDK.

**Smaller integration footprint** The internal HTTP layer has been reworked. The SDK no longer pulls an external HTTP client into your classpath as a transitive dependency, reducing method count and lowering the chance of version conflicts in your host app.

### Improvements

* **Main-thread callbacks guaranteed.** All callbacks returned by the SDK are now delivered on the main thread, so you can safely update your UI from inside them without additional dispatching.
* **Cleaner shutdown of consent dialogs.** When the consent dialog is closed, the SDK no longer performs any further work on the dismissed view, reducing the risk of rare crashes on exit.
* **More predictable concurrent execution.** Internal task management has been reworked for clearer lifecycles and tighter control over parallel operations — cancellation and error handling are now more consistent, and ongoing work stops promptly when no longer needed.
* **Multi-process clarity.** When the SDK is initialized from a non-default process, a clear warning now explains the action required (`WebView.setDataDirectorySuffix(...)` before `initialize`).
* **Faster startup.** Internal initialisation has been streamlined to avoid redundant work and unnecessary background activity, resulting in a lighter SDK bootstrap.

### Internal improvements

These changes are not visible through the public API, but they harden the internals you depend on and are worth knowing about when reading stack traces or comparing versions:

* **Idempotent module wiring.** The SDK's internal dependency-injection layer is now guarded so that loading the same module from multiple entry points no longer re-registers providers — avoids subtle duplicate-state issues when the SDK is wired in from more than one place in a process.
* **Explicit override semantics in the internal wiring.** Duplicate registrations used to be silently skipped; the SDK now uses an explicit replacement path internally, which made our test setups clearer and easier to debug.
* **Cross-cutting utilities regrouped.** Helpers for process info, OS version checks, and internet connectivity — previously scattered across modules — are now consolidated into a single internal utilities layer. Same behaviour, single home, easier to follow when reading a stack trace.
* **Leaner internal state access.** Hot SDK entry points now resolve their dependencies lazily instead of re-looking them up on every call, removing redundant work on frequently-hit paths.
* **Quieter production logs.** Verbose internal tracing in production paths has been replaced by a lighter coroutine helper — logs stay informative without the noise.

### Bug Fixes

* Fixed rare crashes that could occur when a callback was delivered on a background thread to app code expecting the main thread.
* Fixed an issue where the consent dialog could keep processing events after being dismissed.

### Documentation

* The `SFBX` entry-point API is now fully documented (lifecycle, threading, network and multi-process expectations).
* Integration stubs and sample applications have been refreshed to reflect the current public API.

### Upgrade Notes

1. Update your `onCmpClosed` and `onCmpNotDisplayed` callbacks to accept a single `AppconsentExceptions?` parameter — ignore it for a regular close, or react to it as you see fit.
2. If you have an exhaustive `when` over `AppconsentExceptions`, add the five new branches: three connectivity ones (`AppConsentNoConnectivityException`, `AppConsentConnectivityHostUnreachableException`, `AppConsentConnectivityException`), `AppConsentSaveFailedException`, and `AppConsentCallbackJSOnError`.
3. No further code change is required to benefit from the offline detection — the SDK starts using the new error callbacks automatically.
4. Optional: a new `SFBX.initialize(configuration, onCmpReady, onCmpOnError)` overload (no `Context`) is now the recommended entry point when you initialize from `Application`, an `Activity`, or any call site that runs after the SDK has bootstrapped. Keep using `SFBX.initialize(applicationContext, configuration, …)` if you initialize from your own `ContentProvider` that may run before the SDK's bundled one — there the `Context` is still required.

## Version 6.0.0 — April 8, 2026

This is a major release introducing significant stability improvements, better error handling, and critical bug fixes. **This version contains breaking changes** — please review the migration notes in the documentation before upgrading.

### ⚠️ Breaking Changes

* Error handling during SDK initialization has been updated. The `onCmpOnError` callback now receives a typed `AppconsentExceptions` object, giving you more granular control over initialization failures. Update your error handling accordingly.

### What's New

* The SDK now throws a clear, catchable error during initialization if the JavaScript engine fails to start, making issues easier to diagnose.
* The consent clearing method now supports `onSuccess` and `onError` callbacks, giving you better control over the flow.
* A secure loader is now displayed while the CMP is being loaded, improving the perceived experience for your users.

### Bug Fixes

* **Fixed** — The consent window was being hidden when switching between apps. Users can now return to a pending consent dialog without issue.
* **Fixed** — On older Android versions, the WebView was not rendering fully. This affected a significant portion of devices and has been resolved.
* **Fixed** — Tapping the "Close" button on vendor URLs in the bottom modal was incorrectly closing the entire CMP. This no longer occurs.
* **Fixed** — Navigation bar insets are now correctly handled, preventing UI overlap on devices with gesture navigation.
* **Fixed** — A race condition could cause the SDK to initialize twice when accessed from multiple threads simultaneously. This has been resolved.

### Improvements

* Internal scope management has been optimized, resulting in better memory usage and overall SDK performance.

***

## Version 0.3.0-beta01 — February 16, 2026

### ⚠️ Breaking Changes

* The SDK now targets API level 34, in line with Google Play's updated requirements. Please update your project's `compileSdk` and `targetSdk` accordingly.

### What's New

* Updated TCF compliance to version 2.3, managed in coordination with our backend infrastructure.
* The SDK now detects if no WebView component is available on the device and stops initialization gracefully, preventing unexpected crashes.
* A warning is now raised if the SDK is used in a multi-process environment, helping you identify potential WebView conflicts early.
* UI insets are now managed in relation to the illustrations present in your Notice, ensuring a consistent and polished display across devices.

### Bug Fixes

* **Fixed** — In some cases, the CMP screen would not dismiss after the user completed their consent choices.
* **Removed** — Toast notifications for internal CMP events have been removed, as they were occasionally visible to end users.

### Improvements

* Logging has been improved for greater accuracy during debugging.
* JavaScript ↔ Kotlin communication flows have been optimized, along with improved coroutine and flow management for better runtime performance.

***

## Version 0.2.0-beta01 — December 17, 2025

### Internal Changes

* Internal SDK module restructuring. No functional changes. If you reference internal module paths directly in your build configuration, you may need to update them — refer to the migration guide for details.

***

## Version 0.1.0-beta02 — December 9, 2025

### Bug Fixes

* **Fixed** — The second consent layer (Layer 2) was not displaying when the CMP was opened for the first time.
* **Fixed** — The consent clearing flow was not completing correctly.

### Improvements

* Internal logs have been updated to better reflect SDK lifecycle events, making debugging easier.

***

## Version 0.1.0-beta01 — December 5, 2025 — First Public Beta

We're excited to release the first public BETA of our new Consent Management Platform SDK. This is an early release intended for testing and integration feedback. **The API is not yet stable and may evolve — including breaking changes — in future beta updates.**

We warmly encourage you to share your feedback with us.

### What's Included in this Release

* **SDK Initialization** — The main entry point is now available to set up and start the SDK in your application.
* **Consent UI Display** — A method to display the consent interface to your users at the right moment in your app flow.
* **Consent Status Retrieval** — You can now query whether consent has been granted for a specific vendor by ID.
* **Real-time Consent Updates** — A listener is available to receive notifications when a user updates their consent choices.
* **TCF v2.2 Compliance** — The SDK is compliant with the IAB Transparency and Consent Framework v2.2.
* **Documentation** — Initial API documentation is published and available.
