如何在 google Firebase 中获取 default_notification_channel_id 的“fcm_default_channel”值

Posted

技术标签:

【中文标题】如何在 google Firebase 中获取 default_notification_channel_id 的“fcm_default_channel”值【英文标题】:How can I get the value of "fcm_default_channel" for default_notification_channel_id in google Firebase 【发布时间】:2019-10-25 07:35:50 【问题描述】:

在我的 build.gradule (Modile:app) 的 android studio 文件中,我有一个需要在此设置中替换的值。

   resValue "string", "default_notification_channel_id", "fcm_default_channel"

现在我在我的 firebase 设置中,一切都令人困惑,我似乎无法找到它的价值,请有人帮助我。

在我的 firebase 设置中,我有这个选项卡和值

    常规选项卡 项目 ID Web API 密钥

在第二个标签中

    云消息选项卡 服务器密钥 旧版服务器密钥 发件人 ID Web 推送证书(密钥对)

我有这个值,请问应该是哪个值

"fcm_default_channel"    

我需要帮助。谢谢

【问题讨论】:

【参考方案1】:

fcm_default_channel 它是 default_notification_channel_id 键的值,如果你想更改它,只需从它在你的 android 项目中存在的位置更改它,它不在 firebase 控制台中

【讨论】:

好的,请问我如何获取“default_notification_channel_id”的值或 default_notification_channel_id 的键? @mohammad-sommakia BuildConfig.default_notification_channel_id 这不在我的文件中。我已经将所有其他值更改为其他值,但这是几天来唯一给我带来问题的东西。完全困惑和迷失。我在源代码上找不到任何 BuildConfig.default_notification_channel_id。 @mohammad-sommakia 如果它不在您的项目中,您可以将其添加到通常我们在 strings.xml 文件中添加的任何位置 请问你在Skype上吗?还是我应该放弃我的?我只是想让你看看……在我发疯之前@mohammad-sommakia

以上是关于如何在 google Firebase 中获取 default_notification_channel_id 的“fcm_default_channel”值的主要内容,如果未能解决你的问题,请参考以下文章

如何在 google Firebase 中获取 default_notification_channel_id 的“fcm_default_channel”值

如何通过用于下载应用程序的 Google Play 商店帐户获取 Firebase 用户?

iOS Swift Facebook 身份验证与 Google Firebase - 如何获取额外权限?

如何通过 Firebase Google 身份验证获取带有刷新令牌的 YouTube 数据 API 访问令牌?

如何获取对 Google Cloud Functions(不是 Firebase)的 HTTP 请求源的 IP 地址?

无法在 google-services.json 中获取 firebase_url