Last modified November 22, 2014 by Gordon Glauser

Android SDK Upgrade Guide

This guide provides information about how you can upgrade to the latest Swrve Android SDK. For information about the changes that have been made in each Android SDK release, see Android SDK Release Notes.

Upgrading using Maven

If you’re integrating the Android SDK libraries using Maven from the Swrve repository on Jcenter, update the build.gradle to use the latest version (for example, compile 'com.swrve.sdk.android:swrve-google:5.1.0'). For more information, see the Android Integration Guide.


Version 5.1

If you are upgrading from a version prior to 5.0, see the Android SDK 5.0 Upgrade Guide. Otherwise, there are no code changes required to upgrade to Swrve Android SDK v5.1.


Version 5.0

This section provides information to enable you to upgrade to Swrve Android SDK v5.0.

API Changes

With the release of Swrve’s Android SDK version 5.0, we have made major changes to the APIs to ensure internal consistency and improve SDK integration. For a complete list of the changes you need to make, see the Android SDK 5.0 Upgrade Guide.


Version 4.11.3

No code changes are required to upgrade to Swrve Android SDK v4.11.3.


Version 4.11.2

No code changes are required to upgrade to Swrve Android SDK v4.11.2.


Version 4.11.1

No code changes are required to upgrade to Swrve Android SDK v4.11.1.


Version 4.11

This section provides information to enable you to upgrade to Swrve Android SDK v4.11.

Firebase Cloud Messaging

To use the Firebase-flavored SDK, you must remove the Google-flavored SDK from your build.gradle and use the Firebase one instead. You cannot use both together. For new integrations, see the Android Integration Guide. On the Integration Setting screen in Swrve, you can continue to use the Google Cloud Messaging Server Key field to enter your Android Server key for Firebase.

If you’re upgrading a current Google Cloud Messaging app, see How Do I Migrate from Google Cloud Messaging to Firebase?

Google and Firebase SDKs

The new SDKs use the API 26 support libraries, which means you’ll need to update the version of these libraries in your app’s dependencies too and add the new Google Maven repository:

Android O Notification Channels

If you are compiling against API 26 (Android O), you must provide a default Notification Channel in the SwrveConfig object, otherwise Swrve Notifications cannot be shown.

Default SDK Device Logging Level

Swrve logcat logging is now based off Timber and the default logging level has been changed to WARN. For information on how to change the default logging level, see How Do I Configure SDK Device Logging?


Version 4.10.1

No code changes are required to upgrade to Swrve Android SDK v4.10.1.


Version 4.10

This section provides information to enable you to upgrade to Swrve Android SDK v4.10.

Silent Push Notifications

To enable silent push notifications, complete the steps outlined under Configuring Silent Notifications in the Android Integration Guide.


Version 4.9

This section provides information to enable you to upgrade to Swrve Android SDK v4.9.

Android API Level

The minimum API level that the Swrve SDK now supports is level 14 (Ice Cream Sandwich). If your app supports APIs below level 14, the Swrve SDK will not track or execute on those earlier versions, but will operate as normal on level 14 and above.

If your app supports API levels below 14, you need to override the Swrve library defaults. Include the following overrides in your AndroidManifest.xml:

Amazon SDK

If compiling the Amazon SDK from source, you may want to replace the stubbed amazon-device-messaging jar located at SwrveSDK/providedLibs/amazon-device-messaging-STUBBED.jar.


Version 4.8

No code changes are required to upgrade to Swrve Android SDK v4.8.


Version 4.7

No code changes are required to upgrade to Swrve Android SDK v4.7.


Version 4.6.2

No code changes are required to upgrade to Swrve Android SDK v4.6.2.


Version 4.6.1

No code changes are required to upgrade to Swrve Android SDK v4.6.1.


Version 4.6

This section provides information to enable you to upgrade to Swrve Android SDK v4.6.

If Using Install Referrer Tracking

The referrer tracking is now disabled by default in the SDK. To enable it again, add the following snippet to your AndroidManifest.xml:


Version 4.5

This section provides information to enable you to upgrade to Swrve Android SDK v4.5.

ProcessIntent Deprecated

Remove any instances of the SwrveSDK.processIntent method, as it has been deprecated.

Dialog Listener Removed

ISwrveDialogListener has been removed as the SDK now uses an Activity to display in-app messages. You can use the Activity’s lifecycle callbacks to respond to an in-app message being displayed.

Message Listener Changed

ISwrveMessageListener signature has changed to no longer report if it’s the first time the message was opened, as the mechanism to display in-app messages has changed and is no longer needed.


Version 4.4

No code changes are required to upgrade to Swrve Android SDK v4.4.


Version 4.3.1

No code changes are required to upgrade to Swrve Android SDK v4.3.1.


Version 4.3

No code changes are required to upgrade to Swrve Android SDK v4.3.


Version 4.2

This section provides information to enable you to upgrade to Swrve Android SDK v4.2.

New onNewIntent Method

Instrument your activities to call the new onNewIntent method:


Previous Versions

If you are upgrading from a version older than 4.2, please refer to the Android Integration Guide.