我们可以只从 Firebase 通知控制台推送数据消息吗 [英] Can we push only data message from Firebase Notification console

查看:36
本文介绍了我们可以只从 Firebase 通知控制台推送数据消息吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的项目中成功实施了 FCM.

I have implemented FCM successfully in my project.

是否可以从 Firebase 控制台推送数据消息.

Is it possible to push only data message from Firebase console.

推荐答案

很遗憾,没有.通过 Firebase 控制台发送消息时,它将被视为通知负载并按此方式处理.

Unfortunately, no. When sending messages through the Firebase Console, it will be treated as a notification payload and will be handled as such.

但是,您可以在控制台的高级选项部分中包含自定义键值对,这将被视为数据负载的一部分.但该消息将被视为同时具有通知数据负载.

You can however, include custom key-value pairs in the Advance Options section in the console, this will be treated as a part of the data payload. But the message will be treated as having both Notification and Data payload.

如果您坚持发送仅数据有效负载,则应使用 FCM REST API.

If you insist on sending a data only payload, you should make use of the FCM REST API.

这篇关于我们可以只从 Firebase 通知控制台推送数据消息吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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