Migrate Campaign SDK for Android to the latest version
Starting from the 3.9.18 release of March 21, 2024, the Campaign SDK for Android can be found at Maven Central. Instead of manually adding the SDK, we recommend automating the process using the dependency manager.
Attention
If your current Campaign SDK version is 3.8.5 (released in March 2022), you must migrate it to version 3.8.6 first. For instructions, see Migrate Android Campaign SDK 3.8.5 to version 3.8.6.
Automatic migration to a newer version (recommended)
To migrate from version 3.8.6 or later to the current version of Campaign SDK, make the following changes to your Android project:
- Remove the Campaign SDK AAR file from the
libs/
directory. - In your project-level build.gradle file, add
mavenCentral()
as a new repository for global use in the project.
// Example:
repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "https://maven.google.com"
name 'Google'
}
// Use line below for latest beta version or remove to use production version
maven {
url "https://s01.oss.sonatype.org/content/repositories/staging"
}
}
- In the app-level build.gradle file, update the Dependencies section to support Maven. Also, update version numbers for plugins you use with Campaign SDK.
// Example
// Required base libraries
implementation "io.github.go-acoustic:acoustic-mobile-push-android-sdk:+"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-inapp:+"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-inbox:+"
// Use the following for the plugins needed
implementation "io.github.go-acoustic:acoustic-mobile-push-android-calendar:+"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-carousel:+"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-displayweb:+"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-snooze:+"
- Clean and rebuild your project.
Note
The plus sign in our example stands for the latest version of the SDK. You can enter a version number instead, for example
io.github.go-acoustic:acoustic-mobile-push-android-sdk:3.9.18
.You can find the latest version at Index of /repositories/releases/io/github/go-acoustic.
Manual migration to a newer version
If you prefer to update manually, follow these steps:
- Replace the existing AAR files with the new AAR files.
- Replace any plugin source/binaries you use with our SDKs, such as our inbox or in-app plugins.
- Clean and rebuild your project.
Updated 9 days ago