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

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

问题描述

我的项目已经成功实施了FCM。

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

解决方案

不幸的是,没有。当通过Firebase控制台发送消息时,它将被视为通知负载,并将按照这种方式进行处理。

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

如果您坚持只发送数据有效载荷,您应该使用FCM REST API。


I have implemented FCM successfully in my project.

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

解决方案

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.

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

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

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