两个谷歌服务.json(与不同的帐户)在一个应用程序 [英] Two google-services.json (with different accounts) in one app

查看:100
本文介绍了两个谷歌服务.json(与不同的帐户)在一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在Android应用程序中为两种不同的Google服务使用不同的帐户?



我想将Google Analytics与Account customer @ gmail结合使用。 com和Firebase Crashreport与帐户developer@gmail.com。

我得到两个不同的project_info值的google-services.json,无法合并它们。
根据我的理解,不同口味的解决方案并不相关,因为我希望使用2个配置文件来制作相同的口味(释放)。

解决方案

您无法在Google Analytics和崩溃报告这类项目之间进行拆分。崩溃报告实际上很大程度上取决于Google Analytics的一些最佳功能,例如在用户崩溃时触发Google Analytics事件的功能。



您可以但是,请初始化指向不同的 FirebaseApp 实例其他项目,如果你想使用他们的实时数据库和存储功能。有一个博客发布一些用例,但由于Google Analytics的运作方式,这些内容不适用于此。


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).

解决方案

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.

这篇关于两个谷歌服务.json(与不同的帐户)在一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆