![](/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.