FCM receive message Issue

谁说胖子不能爱 提交于 2019-12-20 04:25:24

问题


I'm integrating FCM to my project. But I'm getting below error in Log while notification received. (Error text color is blue)

W/FirebaseMessaging: Received message with unknown type: text

My code is like this:

public void onMessageReceived(RemoteMessage remoteMessage) {
        Log.d("Notification", "Success");
        sendNotification(remoteMessage);
}

In this code, the first line is not executing and it is not debugging also.


回答1:


Finally I got the solution

In php side I'm sending

"message_type":"text"

That's why I got above error.

As "message_type" keyword is predefined by FCM so it is conflicting. So change that keyword in PHP code.



来源:https://stackoverflow.com/questions/39845040/fcm-receive-message-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!