I am currently working on setting up Firebase (FCM) in my project and have encountered a problem when I run my R8-obfuscated app, the Firebase service (FirebaseMessagingService) no longer works. Has anyone encountered the same problem? Any solution?
UPD: Finally I fixed it for FCM by downgrading to
com.google.firebase:firebase-messaging:15.0.0
There are some deprecated classes in use now but it works.
UPD2: While running obfuscated app with the newest versions of libraries I also noticed warnings in the logs:
W/FA: Failed to retrieve Firebase Instance Id
This is most likely the root of the problem.
Finally got it fixed, next proguard rules did a trick for me:
# Firebase
-keep class com.google.android.gms.** { *; }
-keep class com.google.firebase.** { *; } // especially this one