仅在开发设备上测试谷歌Firebase通知 [英] Testing Googles Firebase Notifications on Development Device Only

查看:114
本文介绍了仅在开发设备上测试谷歌Firebase通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个android应用程序,我希望能够在Firebase中使用通知系统。我想要使​​用先进的功能,我可以添加键/值对,以便我可以实现通知在点击某些条件下做不同的事情。



我显然只想在我的测试/开发设备上测试这个,但是看不到这样做的方法。

h2_lin>解决方案

build-variants.htmlrel =nofollow noreferrer>配置Build Variants ),并创建一个独立的firebase项目(带有一个单独的google-services.json文件)(添加多个google-services.json文件)。

然后,您为每个不相互影响的项目使用不同的API密钥。

I am working on an android app where I want to be able to use the notification system within Firebase. I want to use the advanced features where I can add key/value pairs so that I can implement the notifications to do different things under certain conditions when clicked.

I obviously only want to test this on my test/development devices but can't see a way to do this.

解决方案

You could create a new product flavor for your app (e.g. "development") (Configure Build Variants) and create a seperate firebase project (with a seperate google-services.json file) (Add multiple google-services.json files).

Then you have different API keys for each project which don't effect each other.

这篇关于仅在开发设备上测试谷歌Firebase通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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