I ran into the strange problem of integrating Firebase Cloud Messaging in a library module. I am working on a library project in which I need to process notifications coming from the FCM server from the library itself. I do not know if this is possible or not.
Sequence of steps:
- I created Project on the Firebase Console.
- Inside the project, I created an application with a package similar to my library package.
- I downloaded and placed
google-services.json
in the library module. - I applied the dependency in the gradle library module.
- Now I have initialized my library module in the application module. I also get a log of the generated device token from
FirebaseInstanceIdService
.
Problem: When I try to send push from the Firebase Console, I do not receive any notifications.
Has anyone encountered such a problem and could help me?
source
share