Migrate Campaign SDK for Android to the latest version
We recommend migrating to a newer version using Maven Central, but a manual option is also available.
Automatic migration from 3.9.18 to the latest version
If you are using Campaign SDK for Android 3.9.18 of March 2024, it means your project is connected to Maven Central and version updates are automated.
In your Android project, open the app-level build.gradle file and check the Dependencies section.
- If you have the plus sign for the version number, no action is needed. The update was already installed automatically.
// 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:+"
// Additional libraries
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:+"
implementation 'com.google.android.gms:play-services-location:+'
- If you want to control when updates happen, replace the current version number with the latest version number for each library. Clean and rebuild your project after that.
// Required base libraries
implementation "io.github.go-acoustic:acoustic-mobile-push-android-sdk:3.9.22"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-inapp:3.9.22"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-inbox:3.9.22"
// Additional libraries
implementation "io.github.go-acoustic:acoustic-mobile-push-android-calendar:3.9.22"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-carousel:3.9.22"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-displayweb:3.9.22"
implementation "io.github.go-acoustic:acoustic-mobile-push-android-snooze:3.9.22"
implementation "com.google.android.gms:play-services-location:3.9.22"
Manual migration from 3.8.6 and later to the latest version
You can manually migrate to the latest version of Campaign SDK for Android from version 3.8.6 (June 2022) or later.
- In your Android project, open the
libs/
directory and replace all existing AAR files with the new AAR files. - Add the libraries to the app-level build.gradle file.
- Clean and rebuild your project.
Instructions for older versions
If your current version is between 3.8.6 and 3.8.7, you must migrate your Android project to Maven Central before switching to the latest version.
If your current 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 from 3.8.6 and later to 3.9.22
- Remove the Campaign SDK AAR files 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 the libraries 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.
Updated 8 months ago