- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我遇到了 FCM 的问题,正如 Firebase 团队记录的那样:
click_action: Indicates the action associated with a user click on the notification. When this is set, an activity with a matching intent filter is launched when user clicks the notification.
我知道它已经被讨论过,但根据我的理解,根据我从文档中了解到的内容,这应该可以从 firebase 控制台实现。它没有说明它用于数据消息,它清楚地说明了它是用于通知消息的字段,据我了解,这些是 Firebase 控制台发送的。
谁能澄清一下。谢谢!!
最佳答案
click_action目前无法通过 Firebase 控制台使用。
您说控制台发送通知消息是正确的,但是它不允许您设置通知消息的 click_action 字段。要使用 click_action,您必须使用 REST API 发送通知消息,其中所有通知消息字段都可用。
请注意,通过控制台添加的自定义数据成为数据负载中的键/值对,将伴随通知消息。示例结构:
{
"to": <topic>,
"notification": {
<notification payload>
},
"data": {
<data payload, console custom data key/value pairs go here>
}
}
所以 click_action 是通知负载的一部分,但此时您必须使用 REST API 才能使用它。我知道这还不清楚,我会研究可能的文档更新以使其更清楚。
关于android - Firebase click_action 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38921525/
我正在使用 Firebase Cloud Messaging 向我的应用的客户端发送通知。客户端可以是三个受支持平台(ios、android、web)中的任何一个。 我希望用户能够单击通知来启动应用程
我遇到了 FCM 的问题,正如 Firebase 团队记录的那样: click_action: Indicates the action associated with a user click on
我正在使用 Cloud Functions 并使用它发送推送通知。发送通知按预期工作,但 click_action 属性不起作用。当我点击通知时没有任何反应。这是我的代码: 我的通知负载: const
我有一个 Web 应用程序(Angular 6)和移动应用程序(Ionic 4),它们都连接到同一个数据库。我正在使用 FCM(Firebase Cloud Message)进行推送通知。我已经关注了
我的 fcm 点击操作有问题,收到通知后,当我点击它时,它应该打开浏览器,转到“www.google.co.in”,但是当我点击通知时,它会打开默认主要 Activity 。 这是我的 onMessa
我对 FCM 有疑问,当我收到通知时,我希望它打开特定 Activity ,默认情况下,当我不添加 click_action 时,它会打开应用程序的主要 Activity ,但是当我添加 click_
所以我目前正在开发 PWA。 我现在正在使用 推送通知 而且我已经能够使用以下非常简单的 JSON 结构接收后台和前台通知。 { "message":{ "token":"aValidTo
我的问题与( question )有些相似,但有一些不同。 我正在使用 FCM Admin SDK,但仍然没有看到为 Web 推送通知发送 click_action 属性的选项。 我也检查了 admi
这是我必须发送消息的代码。消息发送得很好,我的手机收到了远程通知;但是,该通知并不是我需要的可操作通知。 请帮忙!我需要有关 Swift 的任何建议或帮助。 我正在尝试发送上游消息。我希望此消息成为接
我实现了 Firebase 并测试了 Firebase 通知。当应用程序在前台时,我没有遇到任何问题,我实现了一项扩展 FirebaseMessagingService 并在 onMessageRec
当应用程序在后台时,当用户单击通知时,我试图打开一个特定的 Activity 。从文档中,我知道 click_action 必须添加到有效负载中,并在应用程序中添加一个 Intent 过滤器来处理它。
我正在使用这个 react-native-firebase 和 react-navigation 进行导航,我可以成功地从服务器或控制台推送通知,无论它是在前台还是后台,但我发誓文档不是很清楚如何打开
我试图让我的“click_action”将用户带到我发送给客户端的通知上的特定 URL,但无论我做什么,要么什么都不做(桌面),要么只是打开 PWA(android)。消息通过正常(在 Chrome
我是一名优秀的程序员,十分优秀!