简体   繁体   中英

How to connect firebase if I have multiple modules in my android native app

I am working on my Final year project, which is an android native app, using Kotlin. my question is how to connect firebase with all modules do I need to copy the JSON file in every module as well as add all the required dependencies in every module ie auth module, resources module, etc. I am confused about this I think this would be really hard to maintain.

No need to add dependency in each and every module, let's just keep all the firebase related handling in separate firebase module and add that module in main app module. From app module you can simply call the implementation in firebase module and make it work.

PS: please make sure the project you are gonna develop has to be multi-module. Not every app needs to develop on multi-module approach IMO.

As you are already having a multi module Android app, so you definitely must be having a base\/core module on which all the other modules must be depending on.

  1. <\/li>
  2. This way you will get access to Firebase across all the modules which depend on your base\/common module.<\/li><\/ol>"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM