Package-level declarations

Types

Link copied to clipboard
data class LocationConfig(val enabled: Boolean = false)

Location-tracking config block on SwanConfig.

Link copied to clipboard
data class LoginResult(val cdid: String?, val profileSwitched: Boolean)

Result returned by Swan.login / Swan.loginForTests.

Link copied to clipboard
data class PushNotificationReceivedPayload(val messageId: String?, val title: String?, val body: String?, val data: Map<String, String>)

Payload fired to host-app listeners registered via Swan.addPushNotificationReceivedListener when a data-only FCM message arrives in the foreground BEFORE the SDK has displayed the system notification.

Link copied to clipboard
data class PushNotificationsConfig(val enabled: Boolean = true)
Link copied to clipboard
object Swan

Swan SDK — Android, v1.

Link copied to clipboard
data class SwanConfig(val debug: Boolean = false, val production: Boolean = true, val pushNotifications: PushNotificationsConfig = PushNotificationsConfig.DEFAULT, val location: LocationConfig = LocationConfig.DEFAULT)

Host-app configuration for Swan.init.

Link copied to clipboard
data class SwanDeviceInfo(val platform: String, val osModal: Int, val deviceModal: String, val deviceBrand: String, val deviceId: String?, val generatedCDID: String?, val currentCDID: String?, val identifier: String?, val location: SwanLocation?)

Snapshot of the SDK's view of the host device.

Link copied to clipboard
object SwanEvents

Typed semantic e-commerce event helpers.

Link copied to clipboard
data class SwanIdentifierChangedPayload(val swanIdentifier: String, val source: SwanIdentifierChangedPayload.Source)

Payload delivered to every Swan.addSwanIdentifierChangedListener callback.

Link copied to clipboard
data class SwanLocation(val latitude: Double, val longitude: Double, val accuracy: Double?, val timestamp: Long)

Geo coordinates supplied by the host app via Swan.updateLocation.

Link copied to clipboard

Public constants for the five predefined Swan notification channel ids.