Skip to main content

Activation Android SDK 1.1.1

1.1.1 builds on the theming system introduced in 1.1.0. It adds finer-grained semantic color roles, per-screen color overrides through Activation.appearance, a customizable loading screen, offer-detail and receipt-summary refinements, and support for fractional (weighted) quantities in Missed Earnings.

Most of the release is additive. Integrations that style the SDK through the documented factory and named-argument APIs need only bump the BOM and build against Android SDK Platform 37 — see Installation and Breaking changes.

note

This release compiles against Android SDK Platform 37 (compileSdk 37). Consuming modules must compile against API level 37 or higher; the SDK's own targetSdk is unchanged. See Installation.

Installation

Bump the BOM to 1.1.1. You still depend only on activation-bom and activation; everything else is pulled in automatically.

build.gradle.kts
dependencies {
implementation(platform("com.actualplatform:activation-bom:1.1.1"))
implementation("com.actualplatform:activation")
}

1.1.1 is compiled against compileSdk 37, so your app or library module must also compile against API level 37 or higher. Install Android SDK Platform 37 from the SDK Manager and set:

build.gradle.kts
android {
compileSdk = 37 // 37 or higher
}

Your app's targetSdk does not need to change.

tip

The SDK ships its own consumer ProGuard/R8 rules and is safe under R8 full mode. If you previously added broad keep rules for Activation classes as a workaround, you can remove them.

What's new

  • Finer-grained semantic color roles. Six new theme color tokens — accent, surfaceBrand, textOnPrimary, textOnSecondary, tagSurface, and tagText — give you independent control over accent glyphs, brand bands, on-color text, and promo tags. Each defaults from an existing role, so they're invisible until you set them. See Finer-grained theming.
  • Per-screen color overrides. Activation.appearance now carries fine-grained, per-element color overrides for the Offers Wall, Loading screen, Error modal, Receipt Summary, and Missed Earnings — layered on top of the global theme. See Per-screen appearance overrides.
  • Customizable loading screen. The ad-loading screen's background, progress bar, and copy now follow your theme and can be overridden per element.
  • Offer-detail and receipt-summary refinements. Visual polish across the offer-detail screen and receipt summary, all customizable through the new per-screen colors.
  • Fractional Missed Earnings quantities. Missed-earnings items now support decimal quantities, so weighted goods (for example, produce sold by weight) are represented correctly. No integrator setup is required; the flow remains built into the offer wall. See Missed Earnings.
  • "All Stores" label. Offers with no merchant restriction now clearly show an All Stores label, including while the offers wall is still loading.

Finer-grained theming

ActivationTheme.Colors now exposes 20 semantic color tokens. The six new tokens each default from a sibling role, so existing themes render identically until you override them — reach for them when you need one element to differ from the role it shares today.

TokenDefaults fromUse it for
accentprimaryEmphasis glyphs and indicator accents (section arrows, edit pencils, input cursors), independent of primary buttons
surfaceBrandprimaryFull-bleed brand bands such as the receipt-summary header — e.g. a white header while buttons stay your brand color
textOnPrimarytextInverseText and icons on primary-filled controls (buttons, the FAB, filled dialog actions)
textOnSecondarytextInverseText and icons on secondary-filled surfaces (the total-points pill)
tagSurfacesurfaceAccentPromo tag pill background (e.g. a "BUY 2" badge)
tagTexttextAccentPromo tag text

Set tokens through the ActivationColorDefaults factories, which now accept 20 named parameters — each with a default, so you pass only what you want to change:

Activation.theme = ActivationTheme(
lightColors = ActivationColorDefaults.lightColors(
primary = 0xFF7C3AED,
surfaceBrand = 0xFFFFFFFF, // white receipt-summary header, brand-colored buttons
tagSurface = 0xFFEDE9FE,
tagText = 0xFF6D28D9,
),
)

For the full token catalogue, dark-mode guidance, and contrast tips, see Android Theme Customization.

Per-screen appearance overrides

Activation.appearance layers per-screen overrides on top of the global theme. Alongside the existing offers-wall labels, each screen now exposes fine-grained, per-element color overrides for the Offers Wall, Loading screen, Error modal, Receipt Summary, and Missed Earnings.

Every appearance color is a nullable Long? in 0xAARRGGBB form. null (the default) falls back to the exact theme token that element already renders with, so unset keys never change a pixel — set your brand roles on the theme first, and reach for appearance colors only when one specific element needs to differ.

Activation.appearance = ActivationAppearance(
offersWall = ActivationAppearance.OffersWall(
colors = ActivationAppearance.OffersWall.Colors(
offerWallBackground = 0xFFFAF5FF, // override just this screen's background
),
),
receiptSummary = ActivationAppearance.ReceiptSummary(
colors = ActivationAppearance.ReceiptSummary.Colors(
postScanHeaderBackground = 0xFFFFFFFF, // white header band, buttons unchanged
),
),
)

Activation.appearance is settable from any thread at any time, with no Compose import, and updates propagate live to every SDK screen currently composed. For the full per-screen color catalogue and worked examples, see Android Appearance Customization.

note

Like the rest of the styling API, the theme and appearance are configured in Kotlin (colors are plain Long values). Java callers can set them via Activation.INSTANCE.setTheme(...) / Activation.INSTANCE.setAppearance(...).

Breaking changes

Two changes require attention when upgrading from 1.1.0.

Build against Android SDK Platform 37

1.1.1 is compiled against compileSdk 37, so consuming modules must compile against API level 37 or higher. Install Android SDK Platform 37 and set compileSdk = 37 (see Installation). Your targetSdk does not need to change.

Positional construction of color and appearance records

The six new color tokens extend the parameter list of ActivationTheme.Colors, and ActivationAppearance gains per-screen Colors records. Code that builds these types by position no longer lines up. Use the factories or named arguments — as the theming docs already show:

// Use the ActivationColorDefaults factories (recommended)…
ActivationColorDefaults.lightColors(primary = 0xFF7C3AED)

// …or named arguments.
ActivationAppearance(
offersWall = ActivationAppearance.OffersWall(
labels = ActivationAppearance.OffersWall.Labels(
scanExtendedLabel = "Scan your receipt",
),
),
)

Integrations that already use ActivationColorDefaults.lightColors(...) / darkColors(...) and named arguments — as shown throughout the theme and appearance docs — need no source changes here.

Upgrade checklist

  • Bump the BOM to 1.1.1.
  • Install Android SDK Platform 37 and set compileSdk = 37 (or higher); targetSdk is unchanged.
  • If you construct ActivationTheme.Colors or ActivationAppearance records by position, switch to the ActivationColorDefaults factories or named arguments.
  • Optionally adopt the new accent, surfaceBrand, textOnPrimary, textOnSecondary, tagSurface, and tagText tokens and the per-screen appearance colors to refine your branding.