Two google-services.json (with different accounts) in one app

限于喜欢 提交于 2020-01-01 17:07:29

问题


Is it possible, to use two different accounts for two different services of google in an Android app?

I want to use Google Analytics with Account customer@gmail.com and Firebase Crashreport with Account developer@gmail.com.

I get two google-services.json with different project_info values and can't combine them. The solution for different flavours is not relevant as I understand this, because I want to use 2 configuration files for the same flavour (release).


回答1:


You can't split between projects like this with Analytics and Crash Reporting. Crash Reporting actually depends pretty heavily on Analytics for some of its best features, such as the ability to trigger an Analytics event when there is a crash for a user.

You can, however, initialize different FirebaseApp instances that point to other projects if you want to use their Realtime Database and Storage features. There is a blog post on some of the use cases, but they don't apply here because of the way Analytics works.



来源:https://stackoverflow.com/questions/42698927/two-google-services-json-with-different-accounts-in-one-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!