![](/img/trans.png)
[英]Firebase Notification successfully sent via CURL and Firebase console but not received on the device
[英]FCM notification is not received when sent from firebase notification console
我在应用程序中使用Firebase通知。 我已经执行了Firebase文档中提到的所有步骤。 我还可以在onTokenRefresh()方法中接收注册令牌。 但是,当我尝试从Firebase通知控制台向我的设备发送消息时,它在消息旁边显示为“已完成”状态,但是即使应用程序在后台,我也无法在设备上收到任何信息。
您需要调用private void sendNotification(String topic); 重写方法中的方法public void onMessageReceived(RemoteMessage remoteMessage)。 然后您的通知将添加到通知栏。
编码愉快。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.