2

I have two google accounts, first is for Notifications and second is for Google sign in. For implementing this two services I should add two configuration files in my android application, but i can't do that because google does not support that. I had searched in google, there are people who recommend to use flavors, but I can't do that. So I think about merging two google-services.json files. Or should I remove one of google accounts and create new one in second account. What should I do?

Rid Hrant
  • 112
  • 1
  • 1
  • 11

3 Answers3

1

Its better to use single google account. You can use both Google sign in and Notifications api in single account.

1

its not possible, you have to choose second option, you need to use one google project for different google services

Mayur Dabhi
  • 3,607
  • 2
  • 14
  • 25
1

Google does document several approaches to support multiple sets of google-services.json parameters, see https://firebase.google.com/docs/projects/multiprojects

From what you've asked,the best option may be to create your own firebase object https://firebase.google.com/docs/projects/multiprojects#use_multiple_projects_in_your_application However, they explain some of the risks and limitations of having multiple sets of parameters in https://firebase.google.com/docs/projects/multiprojects#reliable-analytics

They also provide helpful documentation on how the file is processed https://developers.google.com/android/guides/google-services-plugin#processing_the_json_file which may help you especially if you decide to merge the contents of several google-services.json files.

Out of interest, what approach did you end up taking?

JulianHarty
  • 3,178
  • 3
  • 32
  • 46