Reputation: 25287
I am facing a weird issue integrating Firebase Cloud Messaging in a library module. I am working on a library project in which I need to handle notifications right coming from the FCM Server from the library itself. I am not aware if it is possible or not.
Steps I followed:
google-services.json
in library module. FirebaseInstanceIdService
.Problem: When I try to send push from Firebase Console, I am not receiving any Notification.
Have anyone faced such issue and could help me with this ?
Upvotes: 9
Views: 3835
Reputation: 25287
So, after running a lot through trial and error method, I succeeded in getting Notifications.
Things to be noted:
google-services.json
file in his directory and not in library module directory.apply plugin: 'com.google.gms.google-services'
So, once I made those two changes, I was able to get Notifications.
Upvotes: 14
Reputation: 382
Integrating FCM using Android Studio is very easy, You have to only , Tool->>Firebase->>on the Right panel ->>Choose cloud Messaging. Setup-->Firebase cloud messaging.
Then you have to follow point number 1,2,3. And you have to also register your app to Firebase console also as you already status.
Upvotes: -1
Reputation: 1570
FCM clients require devices running Android 2.3 or higher that also have the Google Play Store app installed, or an emulator running Android 2.3 with Google APIs.
If you are Using an Emulator Please Check whether Google APIs were installed or Not.
Upvotes: 0