简体   繁体   English

没有收到Firebase Cloud Messaging通知

[英]Not receiving Firebase Cloud Messaging Notifications

I'm using Xamarin to create a Simple Android Application that receives Push Notifications from Firebase Cloud Messaging. 我正在使用Xamarin创建一个简单的Android应用程序,该应用程序从Firebase Cloud Messaging接收推送通知。

I Followed Xamarin's Documentation to implement this function. 我遵循Xamarin的文档来实现此功能。

And followed it step by step until the section that reads: 然后逐步进行操作,直到显示以下内容:

Background Notifications 后台通知

I tapped the Log Token Button and received the token. 我点击了“日志令牌”按钮并收到了令牌。

The next step is to send the notification from Firebase Console, but the notification never gets to the emulator after sending it and no error is logged on Firebase nor the Xamarin console. 下一步是从Firebase控制台发送通知,但是通知在发送后永远不会到达模拟器,并且在Firebase或Xamarin控制台上都不会记录错误。

The Firebase console displays the message as 'Completed'. Firebase控制台将消息显示为“已完成”。

What am I missing to resolve this issue? 解决此问题我缺少什么?

Messages sent from the Firebase Notifications console are treated as notification -only message payloads (unless you add in a custom key-value pair, then it becomes a notification and data together). 从Firebase通知控制台发送的消息被视为仅notification消息有效负载(除非您添加自定义键值对,否则它将一起成为notificationdata )。

notification -only message payload behavior is when the app is in background, the Android System will handle the notification. notification仅消息有效负载行为是当应用程序在后台运行时,Android系统将处理该通知。 See Handling Messages for Android for more details on the behavior. 有关行为的更多详细信息 ,请参见处理 Android 消息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM