Android SDK upgrade guide
Upgrading using gradle
If you’re integrating the Android SDK using gradle, update the build.gradle
to use the latest version (for example, implementation 'com.swrve.sdk.android:swrve-firebase:7.6.0'
). For more information, see the Android integration guide.
Version 7.6.0
There are no code changes required to upgrade to Swrve Android SDK v7.6.0.
Support for Huawei Push Services
For information on using the new Swrve Huawei SDK library for Huawei push notifications, see the Android integration guide.
Version 7.5.0
There are no code changes required to upgrade to Swrve Android SDK v7.5.0.
Version 7.4.0
This section provides information for upgrading to Swrve Android SDK v7.4.0.
Embedded campaigns
For information on adding embedded campaigns to your Swrve integration, see the Android integration guide.
Version 7.3.2
There are no code changes required to upgrade to Swrve Android SDK v7.3.2.
Version 7.3.1
There are no code changes required to upgrade to Swrve Android SDK v7.3.1.
Version 7.3.0
There are no code changes required to upgrade to Swrve Android SDK v7.3.0.
Firebase Instance ID exceptions
The Firebase messaging library now validates your google-services.json
file and throws an
IllegalArgumentException if problems are found. If you see this exception in Logcat, then refresh your google-services.json
file from the Firebase console.
Version 7.2.1
There are no code changes required to upgrade to Swrve Android SDK v7.2.1.
Version 7.2.0
There are no code changes required to upgrade to Swrve Android SDK v7.2.0.
Version 7.1.0
This section provides information for upgrading to Swrve Android SDK v7.1.0.
Amazon Device Messaging (ADM) 1.1.0
We updated the ADM library to 1.1.0, which brings support for Fire OS7. To upgrade to this version, add the following entry in your AndroidManifest.xml under the application tag:
<service android:name="com.swrve.sdk.SwrveAdmHandlerJobService" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="false" />
For information about ADM, see the Amazon Developer docs.
Version 7.0.0
This section provides information for upgrading to Swrve Android SDK v7.0.0.
Removed | Summary |
---|---|
SwrveNotificationCustomFilter |
We removed the deprecated SwrveNotificationCustomFilter . Please use SwrveNotificationFilter instead, which exposes more details of the notification than its predecessor. |
Changed | Summary |
SwrveNotificationConfig.accentColorResourceId to SwrveNotificationConfig.accentColorHex |
Changed the notification accent color configuration from RGB to Hex. |
Moved | To |
SwrveCustomButtonListener |
Moved from com.swrve.sdk.SwrveSDKBase to com.swrve.sdk.config.SwrveInAppMessageConfig . This listener needs to be set before starting the Swrve SDK as part of the config object. |
SwrveDismissButtonListener |
Moved from com.swrve.sdk.SwrveSDKBase to com.swrve.sdk.config.SwrveInAppMessageConfig . This listener needs to be set before starting the Swrve SDK as part of the config object. |
DismissButtonListener |
Moved from com.swrve.sdk.SwrveSDKBase to com.swrve.sdk.config.SwrveInAppMessageConfig , This listener needs to be set before starting the Swrve SDK as part of the config object. |
defaultBackgroundColor |
Moved from com.swrve.sdk.SwrveConfigBase to com.swrve.sdk.config.SwrveInAppMessageConfig |
inAppMessageFocusColor |
Moved from com.swrve.sdk.config.SwrveConfigBase to com.swrve.sdk.config.SwrveInAppMessageConfig and renamed to focusColor . |
inAppMessageClickColor |
Moved from com.swrve.sdk.config.SwrveConfigBase to com.swrve.sdk.config.SwrveInAppMessageConfig and renamed to clickColor . |
autoShowMessagesMaxDelay |
Moved from com.swrve.sdk.config.SwrveConfigBase to com.swrve.sdk.config.SwrveInAppMessageConfig . |
AndroidX
We have migrated from android-support to AndroidX. For more information, see Android’s Migrating to AndroidX guide.
Firebase Cloud Messaging library update
We’ve updated Firebase Cloud Messaging to version 20.1.0 and dropped support for Android 14 and 15. When upgrading to Swrve Android SDK 7.0 ensure your minimum Android support is at 16.
Version 6.3.1
If you are upgrading from a version prior to 6.0, see below. Otherwise, there are no code changes required to upgrade to Swrve Android SDK v6.3.1.
Version 6.3
This section provides information for upgrading to Swrve Android SDK v6.3.
Delayed initialization and custom user ID
For information about how to configure the SDK to delay initialization and set a custom user ID for tracking purposes, see the Android integration guide.
Version 6.0.2-6.2.0+
There are no code changes required to upgrade to Swrve Android SDK v6.0.2-6.2.0+
Version 6.0.1
If you are upgrading from a version prior to 6.0, see below. Otherwise, there are no code changes required to upgrade to Swrve Android SDK v6.0.1.
Version 6.0
This section provides information for upgrading to Swrve Android SDK v6.0.
Removed | Summary |
---|---|
swrve-google flavor of SDK | If you are currently using the swrve-google flavor of the SDK, you must migrate to swrve-firebase. For more information, see How do I migrate from Google Cloud Messaging to Firebase? |
Empty constructor for SwrveNotifcationConfig.Builder() . |
You must now pass small notification icons and NotificationChannel into the SwrveNotifcationConfig.Builder() constructor. |
SwrveNotifcationConfig title |
Removed the configuration of notification title from SwrveNotifcationConfig . |
userId property from SwrveConfig |
To set a custom user ID, use our new Identify API call. For more information, see the Android integration guide. |
Default configurations of how notifications are displayed using <meta-data> properties in the AndroidManifest.xml. |
Use the SwrveNotificationConfig instead. |
Configuration of default channel via SwrveConfig |
This has been added to the SwrveNotificationConfig . |
SwrveFirebaseInstanceIdService |
The SwrveFirebaseInstanceIdService class was deprecated in SDK version 5.3 and has been completely removed in 6.0. Remove this from your AndroidManifest.xml if you haven’t already. |
SwrveSDK.setPushNotificationListener |
The SwrveSDK.setPushNotificationListener method was deprecated in SDK version 5.3 and has been completely removed in 6.0. Use SwrveConfig.setNotificationListener instead. |
Removed configuration of HTTP from SwrveConfig |
The SDK now only supports HTTPS. |
Moved | To |
SwrveAdmMessageReceiver |
Moved from com.swrve.sdk.adm.SwrveAdmMessageReceiver to com.swrve.sdk.SwrveAdmMessageReceiver . Update your AndroidManifest.xml. |
SwrveAdmIntentService |
Moved from com.swrve.sdk.adm.SwrveAdmIntentService to com.swrve.sdk.SwrveAdmIntentService . Update your AndroidManifest.xml. |
SwrveFirebaseMessagingService |
Moved from com.swrve.sdk.firebase.SwrveFirebaseMessagingService to com.swrve.sdk.SwrveFirebaseMessagingService . Update your AndroidManifest.xml. |
Previous versions
If you are upgrading from a version older than 6.0, please refer to the Android Integration Guide.