Android SDK upgrade guide
Upgrading using Gradle
If you use Gradle to integrate the Android SDK, update the build.gradle
to use the latest version (for example, implementation 'com.swrve.sdk.android:swrve-firebase:11.1.1'
). For more information, see the Android integration guide.
Version 11.1.1
There are no code changes required to upgrade to Swrve Android SDK v11.1.1.
Version 11.1.0
There are no code changes required to upgrade to Swrve Android SDK v11.1.0.
Version 11.0.0
This section provides information for upgrading to Swrve Android SDK v11.0.0.
The Swrve SDK now has a minSdkVersion
value of 21, which means you must update the minSdkVersion
value in your build.gradle
to 21.
To use Huawei Push Services, update the version of the Gradle plugin dependency (agcp
) to 1.9.1.303.
The following table lists the methods and fields that have changed or been removed:
Changed | To |
---|---|
SwrveCampaign.getSubject() |
Use SwrveCampaign.getMessageCenterDetails(). getSubject() instead |
SwrveSDK.getAppStoreURLForApp(int appId) |
Method no longer needed. AppStore URLs are no longer supported. |
Removed | Summary |
---|---|
All Swrve Conversations API functions | The Conversations feature is no longer available. |
SwrveCustomButtonListener |
Deprecated as of version 10.11.0. Use SwrveInAppMessageListener instead. |
SwrveDismissButtonListener |
Deprecated as of version 10.11.0. Use SwrveInAppMessageListener instead. |
SwrveClipBoardButtonListener |
Deprecated as of version 10.11.0. Use SwrveInAppMessageListener instead. |
SwrveInstallButtonListener |
Install buttons are no longer supported. |
SwrveEmbeddedMessageListener |
Deprecated as of version 10.9.0. Use SwrveEmbeddedListener instead. |
SwrveInAppMessageConfig.Builder .hideToolbar(boolean hideToolbar) |
The hideToolbar config option is no longer available (always behaves as True). |
Version 10.16.0
There are no code changes required to upgrade to Swrve Android SDK v10.16.0.
Version 10.15.1
There are no code changes required to upgrade to Swrve Android SDK v10.15.1.
Version 10.15.0
There are no code changes required to upgrade to Swrve Android SDK v10.15.0.
Version 10.14.0
There are no code changes required to upgrade to Swrve Android SDK v10.14.0.
Version 10.13.0
There are no code changes required to upgrade to Swrve Android SDK v10.13.0.
Version 10.12.0
This section provides information for upgrading to Swrve Android SDK v10.12.0.
Upgrade to Huawei Push Services
To use Huawei Push Services, update the version of the Gradle plugin dependency (agcp) to 1.9.1.301.
Version 10.11.2
There are no code changes required to upgrade to Swrve Android SDK v10.11.2.
Version 10.11.1
There are no code changes required to upgrade to Swrve Android SDK v10.11.1.
Version 10.11.0
This section provides information for upgrading to Swrve Android SDK v10.11.0.
The following table lists the methods and fields that have changed or been removed:
Changed | To |
---|---|
SwrveCustomButtonListener |
The SwrveCustomButtonListener API is now deprecated. Please use SwrveInAppMessageListener instead to get campaign and button metadata. |
SwrveDismissButtonListener |
The SwrveDismissButtonListener API is now deprecated. Please use SwrveInAppMessageListener instead to get campaign and button metadata. |
SwrveClipboardButtonListener |
The SwrveClipboardButtonListener API is now deprecated. Please use SwrveInAppMessageListener instead to get campaign and button metadata. |
Version 10.10.1
There are no code changes required to upgrade to Swrve Android SDK v10.10.1.
Version 10.10.0
There are no code changes required to upgrade to Swrve Android SDK v10.10.0.
Version 10.9.2
There are no code changes required to upgrade to Swrve Android SDK v10.9.2.
Version 10.9.1
There are no code changes required to upgrade to Swrve Android SDK v10.9.1.
Version 10.9.0
This section provides information for upgrading to Swrve Android SDK v10.9.0.
Permission requests via in-app message
To request push permissions via an in-app message, you must include the permission in your AndroidManifest.xml. For more information, see the Android integration guide.
The following table lists the methods and fields that have changed or been removed:
Changed | To |
---|---|
SwrveEmbeddedMessageListener |
The SwrveEmbeddedMessageListener API is now deprecated. Please use SwrveEmbeddeListener instead which adds a control flag to determine if Control or Treatment campaign |
Version 10.8.0
There are no code changes required to upgrade to Swrve Android SDK v10.8.0.
Version 10.7.0
There are no code changes required to upgrade to Swrve Android SDK v10.7.0.
Version 10.6.0
There are no code changes required to upgrade to Swrve Android SDK v10.6.0.
Version 10.5.0
This section provides information for upgrading to Swrve Android SDK v10.5.0.
- For implementations with other push providers, please use
SwrvePushServiceDefault.handle(Context context, Map<String, String> data, String messageId, long sentTime)
. - All other
SwrvePushServiceDefault
API’s are deprecated.
Version 10.4.0
This section provides information for upgrading to Swrve Android SDK v10.4.0.
Requesting push permissions in Android 13
With the release of Android 13, users must actively grant permission for an app to display notifications on their device. To improve permission opt-in rates, Android recommends waiting until an opportune time to display the permission prompt.
To configure the notification permission request:
- Set the
targetSdkVersion
for the app in yourbuild.gradle
file to at least API Level 33. - Configure the
pushNotificationPermissionEvents
API inSwrveNotificationConfig
with a list of special event names to trigger the prompt. - When a user triggers one of the events, the permission prompt is displayed.
Upgrade to Huawei Push Services
To use Huawei Push Services, update the version of the Gradle plugin dependency (agcp
) to 1.7.2.300.
Version 10.3.0
There are no code changes required to upgrade to Swrve Android SDK v10.3.0.
Version 10.2.0
There are no code changes required to upgrade to Swrve Android SDK v10.2.0.
Version 10.1.0
There are no code changes required to upgrade to Swrve Android SDK v10.1.0.
Version 10.0.0
This section provides information for upgrading to Swrve Android SDK v10.0.0.
The Swrve SDK now has a minSdkVersion
value of 19, which means you must update the minSdkVersion
value in your build.gradle
to 19.
The following table lists the methods and fields that have changed or been removed:
Changed | To |
---|---|
SwrveInAppMessageConfig |
The default button focus behavior for in-app message campaigns will now adjust the size of the focused button instead of adjusting the color of the button. The focusColor configuration has been removed from SwrveInAppMessageConfig . Use the SwrveMessageFocusListener to configure your own default behavior. |
SwrveCustomButtonListener.onAction |
Now contains an extra string argument for the campaign name. |
SwrveDismissButtonListener.onAction |
Now contains an extra string argument for the campaign name. |
Removed | Summary |
SwrveMessageListener |
Method no longer needed. Use embedded campaigns to customize how in-app messages are rendered. |
SwrveSDK.sessionEnd() |
Method no longer needed. |
Previous versions
If you are upgrading from a version older than 10.0.0, please refer to the Android Integration Guide.