firebase - 通过rest api发送消息时如何设置通知通道?
问题描述
我一直在我的 android 应用程序中实现通知通道以支持最新的 android 版本。
您可以在从 Firebase Web 控制台发送消息时设置通知通道 id,但我无法找到在通过 fcm rest api 发送消息时如何设置通道 id。
参考( https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages )中没有提到通知通道,但我很确定必须有一种方法来设置通道 ID。
解决方案
我缺少的键名是android_channel_id
我在Legacy HTTP Server Protocol 文档( https://firebase.google.com/docs/cloud-messaging/http-server-ref )中找到了密钥名称
推荐阅读
- vue.js - 构建类型上不存在属性“隐藏”
- python - 模型处于预测阶段时如何获取输入数据形状?
- python - 从文档中提取页眉和页脚(每页上重复的文本)
- c - 在 C 中的 getline 中识别 EOF 与换行符
- sql - NestJS 中文章和标签与 TypeORM 的关系
- java - 他们是一种使 JLabels 可移动的方法吗?
- unit-testing - 如何在 Flutter 中测试密封状态类?
- spss - 如何在SPSS中将多个变量的信息合并为一个?
- sql - 将时间序列事件转换为警报开启和警报关闭对
- javascript - 反应钩子是否通过 CDN 链接在一个简单的单个 html 文件中工作?