Leanplum / Leanplum-Android-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
46 stars 40 forks source link

Fix compilation issue in FCM module #454

Closed hborisoff closed 3 years ago

hborisoff commented 3 years ago
What Where/Who
People Involved @hborisoff

Description of the changes:

  1. Increased Gradle plugin version because of issues in Android Studio 4.2

  2. Put upper bound to firebase-messaging dependency, because 22.0.0 removes some deprecated classes and causes compilation errors.

Recommended change for supporting 22.0.0 is to use

FirebaseMessaging.getInstance().getToken()
instead of
FirebaseInstanceId.getInstance().getInstanceId()

and

FirebaseMessaging.getInstance().deleteToken() or FirebaseInstallations.getInstance().delete()
instead of
FirebaseInstanceId.getInstance().deleteInstanceId()

but these methods are added in 20.3.0 and we need to wait a little before updating dependency to [20.3.0,), because it is released in Oct 2020, half a year ago.

List with all firebase-messaging versions.