android: fcm in library module

So, after running a lot through trial and error method, I succeeded in getting Notifications.

Things to be noted:

  • You cannot just integrate Firebase Cloud Notifications in library module.
  • Client app module who will be using this library module will have google-services.json file in his directory and not in library module directory.
  • Client app module gradle will be having below line in it and not in library module gradle:

apply plugin: 'com.google.gms.google-services'

So, once I made those two changes, I was able to get Notifications.