We have use single project but we want multiple files firebase push notification google-server.json files how to maintain multiple file in android studio
Asked
Active
Viewed 328 times
-1
-
1Possible duplicate of [Firebase 2.0 - how to deal with multiple flavors (environments) of an android app?](https://stackoverflow.com/questions/37463092/firebase-2-0-how-to-deal-with-multiple-flavors-environments-of-an-android-ap) – AL. May 23 '17 at 07:06
-
Hi Siva. I'm not sure how you'll get different google-services.json even though you only have *one project*, but have a look at the [accepted answer](https://stackoverflow.com/a/37466889/4625829) in the possible duplicate post I linked. – AL. May 23 '17 at 07:07
2 Answers
0
This is not possible because google_services.json file will working or download on bases of your project package name.
- i.e.when you implement Google signUp then download the JSON from google developer site.
- i.e.when you implement Firebase then download the JSON from google firebase console by following steps and overwrite extisting google_service.json.

AskNilesh
- 67,701
- 16
- 123
- 163
0
All you need to do is create modules containing the google-service.json.
Then you can use interfaces to communicate the functionality withing the main app and modules.
e.g
Structure
app
build.gradle will contain
dependencies {
compile project(":firebase-module-one")
compile project(":firebase-module-two")
}
firebase-module-one and firebase-module-two
build.gradle will contain
dependencies {
compile 'com.google.firebase:firebase-messaging:10.0.1'
}
This module will contain the google-service.json

Ashutosh Barthwal
- 363
- 6
- 12