Check Mobile App
Read now
Start a Project

FCM in module dependencies

Save

If you have an application and want to use this app (module) as a library for the other one with both supporting there own FCM then you are at the right place. One might get confused as we will not recreate or rewrite FirebaseInstanceIdService, both the applications will use the single Service that will be defined in the library module. The google-services.json file and the application Id for the project will do all the work for you.

You just have to provide their respective google-services.json files in main module folder as

directory_structure

But don’t for get to add the google-services plugin in build.gradle file of both the modules as this will cause the generation of tokens for only the one module that has this plugin. Many times we forgot to add this plugin to upper level module (i.e MainApplication) and end up with a Firebase Token of library module.

And you are ready to go and one more thing if you are using Topic messaging and just subscribed to a new topic then it will take atleast 3- 4 hours to appear in your Firebase console so there is nothing to worry. Thats all for today. Happy Coding!

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.

Osama
Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home