Firebase Cloud Messaging是否取决于软件包名称? [英] Does Firebase Cloud Messaging depend on the package name?

查看:63
本文介绍了Firebase Cloud Messaging是否取决于软件包名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在Firebase项目控制台上定义的软件包名称是否与Firebase Cloud Message成功交付紧密相关,或者它只是用于创建google-services.json文件的助手.

I want to know if package name, defined on Firebase project console, is tightly related to Firebase Cloud Message successful delivery or it's just a helper for creating google-services.json file.

在Firebase控制台上,一旦创建,便无法重命名.

On Firebase console, once created it can't be renamed.

就我而言,我在Firebase控制台上创建了一个项目,该项目错误地命名为 son .example.firecm,而不是Android Studio中定义的 com .example.firecm项目.

In my case I created a project at Firebase console named, by mistake, son.example.firecm instead of com.example.firecm as defined on my Android Studio Project.

我的Android项目未编译,导致google-services.json的拼写出现空白.

My Android project was not compiling cause gap on spelling at google-services.json.

将包名称重命名为com.example.firecm后,它会进行编译,但不确定是否会收到Firebase Cloud Messages,是否会导致Android Studio项目中Firebase控制台项目包定义之间的差异.

Once renamed package name to com.example.firecm, it compiled but not sure if it will receive Firebase Cloud Messages or not cause difference between Firebase console project package definition at Android Studio project.

推荐答案

我对此做了进一步的研究.

Well I did further research on the same.

我发现,如果Firebase控制台上定义的软件包名称与APP的Gradle和Manifest上定义的软件包名称不同,则APP 将不会能够接收从Firebase控制台发送的通知

I found that if package name defined on Firebase Console isn't the same as defined on Gradle and Manifest of the APP, then the APP won't be able to receive Notifications sent from Firebase Console.

猜测,从某种意义上说,必须在包名匹配时才发出逻辑,以便在通知到达后,Android就可以正确地使用APP.

In guess that in some way it's logic that package name must match in order to Android lunch the correct APP once notification arrives.

概括地说,两个名称匹配是强制性.

To sumarize, it's mandatory that both names matches.

我邀请自己进行测试,并密切注意软件包名称以确保项目成功.

I invite to test by yourself and keep and eye on package names for project success.

这篇关于Firebase Cloud Messaging是否取决于软件包名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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