先生,我正在尝试使用 Firebase 云消息传递来制作聊天应用程序,并停留在解析来自 XMPP 服务器的响应。这是我得到的响应:
jabber:clientXMPPStanza Object ( [xml:XMPPStanza:private] => JAXLXml Object ( [name] => message [ns] => jabber:client [attrs] => Array ( [type] => normal ) [text] => [childrens] => Array ( [0] => JAXLXml Object ( [name] => gcm [ns] => google:mobile:data [attrs] => Array ( ) [text] => {"message_type":"ack","from":"REGID","message_id":"123"} [childrens] => Array ( ) [parent] => JAXLXml Object *RECURSION* [rover] => JAXLXml Object *RECURSION* ) ) [parent] => [rover] => JAXLXml Object *RECURSION* ) ) jabber:clientXMPPStanza Object ( [xml:XMPPStanza:private] => JAXLXml Object ( [name] => message [ns] => jabber:client [attrs] => Array ( [to] => <SENDERID>@gcm.googleapis.com [from] => devices@gcm.googleapis.com [type] => normal ) [text] => [childrens] => Array ( [0] => JAXLXml Object ( [name] => gcm [ns] => google:mobile:data [attrs] => Array ( ) [text] => {"data":{"my_action":"SAY_HELLO","my_message":"Hello World"},"time_to_live":0,"from":"REGID","message_id":"20","category":"package name"} [childrens] => Array ( ) [parent] => JAXLXml Object *RECURSION* [rover] => JAXLXml Object *RECURSION* ) ) [parent] => [rover] => JAXLXml Object *RECURSION* ) )
我已经阅读了所有的 jaxl 文档,但找不到任何健康的东西。请提出任何获取消息和 REGID 的方法。提前致谢。