Android
Release history for the Swan Android SDK.
[android/1.1.3] — 2026-09-22
Artifact: cx.swan:swan-android-sdk:1.1.3 on Maven Central
Min SDK: 21 (Android 5.0) · Target/Compile SDK: 34 · Kotlin: 2.0.21 · AGP: 8.7
Fixed
- Profile updates now always apply to the customer who was active when the update was made.
enrichProfile()is queued and sent in the background; previously, if a login or logout happened — or the send was retried — before the queue flushed, the update could be written against the wrong customer. Each queued update now carries the customer it was made for and is always applied to that customer.
[android/1.1.2] — 2026-08-18
Artifact: cx.swan:swan-android-sdk:1.1.2 on Maven Central
Min SDK: 21 (Android 5.0) · Target/Compile SDK: 34 · Kotlin: 2.0.21 · AGP: 8.7
Fixed
- Push delivery and click receipts are now reported reliably. Previously, if the device was briefly offline the moment a push arrived — most often when the app had been force-closed — the delivery or click receipt could be lost, under-counting delivery and engagement. Receipts are now saved on the device as soon as a push is handled and are automatically retried the next time the app launches or returns to the foreground. Unsent receipts are retained for up to 7 days.
- Push notifications are no longer delayed by receipt reporting. Sending a delivery receipt no longer blocks the notification from being displayed, so a slow or unreachable network can no longer hold up the push.
[android/1.1.1] — 2026-06-25
Artifact: cx.swan:swan-android-sdk:1.1.1 on Maven Central
Min SDK: 21 (Android 5.0) · Target/Compile SDK: 34 · Kotlin: 2.0.21 · AGP: 8.7
Changed
- Device registration resolves the device identifier more robustly. The SDK now reliably obtains the device identifier when registering, so the identifier is consistently available for events and attribution.
[android/1.1.0] — 2026-06-19
Artifact: cx.swan:swan-android-sdk:1.1.0 on Maven Central
Min SDK: 21 (Android 5.0) · Target/Compile SDK: 34 · Kotlin: 2.0.21 · AGP: 8.7
Fixed
Swan.login()now triggers the full backend pipeline. Previously alogin()call suppressed the backend's downstream side-effects (cart, journey, and messaging triggers) in the same wayidentify()does.login()now runs the complete pipeline, so logging a user in fires those side-effects as expected.identify()is unchanged and continues to switch the profile without those side-effects.- Carousel notification text is now readable on dark notification shades. Carousel push notifications previously used hardcoded dark text that became unreadable when the OS drew the notification shade in dark mode; the text now adapts to the light or dark shade.
- Logging out now starts a fresh anonymous identity. When a user who first used the app anonymously and later signed in subsequently logs out, the SDK begins a new anonymous identity instead of reusing the one that had been merged into their account on sign-in. This prevents activity after logout from being attributed to the signed-out user.
[android/1.0.0] — 2026-05-16
First production release of the Swan Android SDK.
Artifact: cx.swan:swan-android-sdk:1.0.0 on Maven Central
Min SDK: 21 (Android 5.0) · Target/Compile SDK: 34 · Kotlin: 2.0.21 · AGP: 8.7
Added
- Core identity —
Swan.init,Swan.identify,Swan.login,Swan.logout,Swan.enrichProfile,Swan.getSwanIdentifier,Swan.getDeviceInfo. Anonymous-to-identified profile merge on the backend. - Event tracking —
SwanEvents.screen,Swan.customEvent,Swan.track, super-properties (setCountry/setCurrency/setBusinessUnit/setCurrentScreenName), session tracking with 20-minute inactivity rollover, offline-first SQLite-backed queue with exponential-backoff retry. - E-commerce events — typed helpers covering
productViewed,productAddedToAddTocart,productAddedToWishlist,checkoutStarted,checkoutCompleted,orderCompleted,search,categoryViewedPage, and the rest of the catalog (see the Track events guide). - Push notifications (FCM) —
SwanMessagingServiceFCM subclass, token registration and rotation, basic + carousel (manual + auto) notification templates, 5 predefined notification channels (swan_transactional,swan_alerts,swan_promotional,swan_general,swan_notifications), custom-sound channel support viaSwan.createNotificationChannel(soundResName=...), badge count, foreground / cold-start notification routing, click acknowledgement. - Deep linking —
Swan.handleDeepLink(url)for external URLs,Swan.handleNotificationIntent(intent)for cold-start,Swan.handleNotificationTap(data)for warm-start, listener model viaSwan.addNotificationOpenedListener+Swan.addDeepLinkOpenedListener, 30-second deduplication onmessageId. - Permissions —
Swan.requestNotificationPermission()(suspending),Swan.hasNotificationPermission(),Swan.isPushEnabled(), gracefulPOST_NOTIFICATIONS-denied handling on Android 13+. - Location —
Swan.updateLocation(lat, lng, accuracy?),Swan.isLocationEnabled(). Host app supplies coordinates; the SDK does not acquire location itself. - Lifecycle listeners —
addInitializedListener,addDeviceRegisteredListener,addDeviceRegistrationFailedListener,addSwanIdentifierChangedListener,addNetworkStateChangedListener,addPushTokenRegisteredListener,addPushTokenRegistrationFailedListener,addPushNotificationReceivedListener,addPushTokenRefreshListener,addNotificationOpenedListener,addDeepLinkOpenedListener,addPushLifecycleListener. - Log markers — six
[SwanSDK] *log lines emit at key lifecycle points (init start, init done, device registered, foreground push received, notification displayed, notification ACK queued) for integration verification.