Leanplum's user guides and developer documentation.

Upgrading to Android 4

You'll need to update your app's dependencies (or included libraries) when you upgrade to Leanplum SDK 4.0. Our original Leanplum library is now split into modular libraries for our separate features.

If you are using FCM, you'll also need to remove the following line from your application class (our new library leanplum-fcm enables Firebase automatically):

LeanplumPushService.enableFirebase(); // <-- No longer needed.

Here are a few concrete examples using gradle:

  1. Firebase + geolocation
  2. Firebase + geolocation + UI Editor
  3. Firebase alone
  4. Leanplum core alone (no push, geolocation, or UI Editor)

If you are still using Google Cloud Messaging, simply use leanplum-gcm instead of leanplum-fcm. You will still need to call setGcmSenderId as defined in our setup docs.

For manual setups, you'll need to drag each desired library's .jar file into your libs/ folder. Since you aren't using Gradle, you must also include the leanplum-core and leanplum-push libraries yourself.

If you use Firebase messaging and geolocation

To update from a previous version, you should change your gradle file from this:

dependencies {
  ...

  compile 'com.leanplum:Leanplum:+'
  compile 'com.google.firebase:firebase-messaging:11.8+' // Minimum supported version is 10.0.1.
  compile 'com.google.android.gms:play-services-location:11.8+' // Minimum supported version is 10.0.1.
  ...
}
// Include for FCM.
apply plugin: 'com.google.gms.google-services'

To this:

dependencies {

  // Firebase messaging.
  compile 'com.leanplum:leanplum-fcm:+'
  compile 'com.google.firebase:firebase-messaging:11.8+' // Minimum supported version is 10.0.1.

  // Location services.
  compile 'com.leanplum:leanplum-location:+'
  compile 'com.google.android.gms:play-services-location:11.8+' // Minimum supported version is 10.0.1.

}
// Include for FCM.
apply plugin: 'com.google.gms.google-services'

Next, be sure to remove this line from the onCreate method of your Application class, as it's no longer needed:

LeanplumPushService.enableFirebase(); // <-- No longer needed.

If you use Firebase, geolocation and UI Editor

To update from a previous version, you should change your gradle file from this:

dependencies {
  ...

  // Leanplum with UI Editor.
  compile 'com.leanplum:Leanplum:+'
  compile 'com.leanplum:UIEditor:2.+'

  // Firebase and geolocation.
  compile 'com.google.firebase:firebase-messaging:11.8+' // Minimum supported version is 10.0.1.
  compile 'com.google.android.gms:play-services-location:11.8+' // Minimum supported version is 10.0.1.
  ...
}
// Include for FCM.
apply plugin: 'com.google.gms.google-services'

To this:

dependencies {

  // Firebase messaging.
  compile 'com.leanplum:leanplum-fcm:+'
  compile 'com.google.firebase:firebase-messaging:11.8+' // Minimum supported version is 10.0.1.

  // Location services.
  compile 'com.leanplum:leanplum-location:+'
  compile 'com.google.android.gms:play-services-location:11.8+' // Minimum supported version is 10.0.1.

  // UI Editor.
  compile 'com.leanplum:leanplum-uieditor:+'

}
// Include for FCM.
apply plugin: 'com.google.gms.google-services'

Next, be sure to remove this line from the onCreate method of your Application class, as it's no longer needed:

LeanplumPushService.enableFirebase(); // <-- No longer needed.

If you only use Firebase messaging

To update from a previous version, you should change your gradle file from this:

dependencies {

  // Leanplum and Firebase messaging.
  compile 'com.leanplum:Leanplum:+'
  compile 'com.google.firebase:firebase-messaging:11.8+' // Minimum supported version is 10.0.1.

}
// Include for FCM.
apply plugin: 'com.google.gms.google-services'

To this:

dependencies {

  // Leanplum and Firebase messaging.
  compile 'com.leanplum:leanplum-fcm:+'
  compile 'com.google.firebase:firebase-messaging:11.8+' // Minimum supported version is 10.0.1.

}
// Include for FCM.
apply plugin: 'com.google.gms.google-services'

Next, be sure to remove this line from the onCreate method of your Application class, as it's no longer needed:

LeanplumPushService.enableFirebase(); // <-- No longer needed.

If you use Leanplum core only

To update from a previous version, you should change your gradle file from this:

dependencies {

  compile 'com.leanplum:Leanplum:+'

}

To this:

dependencies {

  // Leanplum without push, geolocation, or UI Editor.
  compile 'com.leanplum:leanplum-core:+'

}

For more detail, see our setup instructions.