Check Mobile App
Read now

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

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

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

    Back to Home